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
connectors::Globalpay, connectors::Globepay, connectors::Gocardless, connectors::Gpayments, connectors::Hipay, connectors::Helcim, connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, connectors::Inespay, connectors::Itaubank, connectors::Jpmorgan, ...
crates/hyperswitch_connectors/src/default_implementations_v2.rs#chunk2
hyperswitch_connectors
chunk
8,189
null
null
null
null
null
null
null
null
null
null
null
null
null
pub fn server(state: AppState) -> Scope { let mut route = web::scope("/mandates").app_data(web::Data::new(state)); #[cfg(feature = "olap")] { route = route.service(web::resource("/list").route(web::get().to(retrieve_mandates_list))); route = route.service...
crates/router/src/routes/app.rs
router
function_signature
138
rust
null
null
null
null
server
null
null
null
null
null
null
null
pub struct DwollaErrorDetail { pub code: Option<String>, pub message: Option<String>, }
crates/hyperswitch_connectors/src/connectors/dwolla/transformers.rs
hyperswitch_connectors
struct_definition
22
rust
DwollaErrorDetail
null
null
null
null
null
null
null
null
null
null
null
File: crates/router/tests/connectors/thunes.rs use masking::Secret; // use router::{ // types::{self, api, storage::enums, // }}; use crate::utils::{self, ConnectorActions}; use test_utils::connector_auth; #[derive(Clone, Copy)] struct ThunesTest; impl ConnectorActions for ThunesTest {} impl utils::Connector for...
crates/router/tests/connectors/thunes.rs
router
full_file
2,901
null
null
null
null
null
null
null
null
null
null
null
null
null
File: crates/analytics/src/auth_events/core.rs Public functions: 3 use std::collections::HashMap; use api_models::analytics::{ auth_events::{ AuthEventDimensions, AuthEventMetrics, AuthEventMetricsBucketIdentifier, MetricsBucketResponse, }, AuthEventFilterValue, AuthEventFiltersResponse, ...
crates/analytics/src/auth_events/core.rs
analytics
full_file
1,968
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct WisePayoutsWebhookResource { pub id: u64, }
crates/hyperswitch_connectors/src/connectors/wise/transformers.rs
hyperswitch_connectors
struct_definition
19
rust
WisePayoutsWebhookResource
null
null
null
null
null
null
null
null
null
null
null
pub struct Settings<S: SecretState> { pub server: Server, pub master_database: SecretStateContainer<Database, S>, pub redis: redis::RedisSettings, pub log: Log, pub drainer: DrainerSettings, pub encryption_management: EncryptionManagementConfig, pub secrets_management: SecretsManagementConfi...
crates/drainer/src/settings.rs
drainer
struct_definition
81
rust
Settings
null
null
null
null
null
null
null
null
null
null
null
pub struct AuthResponse { data: DataAuthResponse, }
crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs
hyperswitch_connectors
struct_definition
13
rust
AuthResponse
null
null
null
null
null
null
null
null
null
null
null
File: crates/hyperswitch_interfaces/src/disputes.rs Public structs: 1 //! Disputes interface use common_utils::types::StringMinorUnit; use hyperswitch_domain_models::router_response_types::DisputeSyncResponse; use time::PrimitiveDateTime; /// struct DisputePayload #[derive(Default, Debug)] pub struct DisputePayload ...
crates/hyperswitch_interfaces/src/disputes.rs
hyperswitch_interfaces
full_file
370
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct CustombillingCard { number: cards::CardNumber, expiry_month: Secret<String>, expiry_year: Secret<String>, cvc: Secret<String>, complete: bool, }
crates/hyperswitch_connectors/src/connectors/custombilling/transformers.rs
hyperswitch_connectors
struct_definition
41
rust
CustombillingCard
null
null
null
null
null
null
null
null
null
null
null
pub struct GetDisputeMetricRequest { pub time_series: Option<TimeSeries>, pub time_range: TimeRange, #[serde(default)] pub group_by_names: Vec<DisputeDimensions>, #[serde(default)] pub filters: disputes::DisputeFilters, pub metrics: HashSet<DisputeMetrics>, #[serde(default)] pub delt...
crates/api_models/src/analytics.rs
api_models
struct_definition
80
rust
GetDisputeMetricRequest
null
null
null
null
null
null
null
null
null
null
null
pub fn get_order_id( meta: &NexinetsPaymentsMetadata, ) -> Result<String, error_stack::Report<errors::ConnectorError>> { let order_id = meta.order_id.clone().ok_or( errors::ConnectorError::MissingConnectorRelatedTransactionID { id: "order_id".to_string(), }, )?; Ok(order_id) ...
crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs
hyperswitch_connectors
function_signature
79
rust
null
null
null
null
get_order_id
null
null
null
null
null
null
null
impl NewUserMerchant { pub fn get_company_name(&self) -> Option<String> { self.company_name.clone().map(UserCompanyName::get_secret) } pub fn get_merchant_id(&self) -> id_type::MerchantId { self.merchant_id.clone() } pub fn get_new_organization(&self) -> NewUserOrganization { ...
crates/router/src/types/domain/user.rs
router
impl_block
1,450
rust
null
NewUserMerchant
null
impl NewUserMerchant
null
null
null
null
null
null
null
null
impl api::PaymentToken for Stripebilling {}
crates/hyperswitch_connectors/src/connectors/stripebilling.rs
hyperswitch_connectors
impl_block
9
rust
null
Stripebilling
api::PaymentToken for
impl api::PaymentToken for for Stripebilling
null
null
null
null
null
null
null
null
pub struct CheckoutRequest { amount: String, currency: enums::Currency, custom_ipn_url: String, items: Vec<ZenItemObject>, merchant_transaction_id: String, signature: Option<Secret<String>>, specified_payment_channel: ZenPaymentChannels, terminal_uuid: Secret<String>, url_redirect: S...
crates/hyperswitch_connectors/src/connectors/zen/transformers.rs
hyperswitch_connectors
struct_definition
72
rust
CheckoutRequest
null
null
null
null
null
null
null
null
null
null
null
impl GetPaymentMethodType for RealTimePaymentData { fn get_payment_method_type(&self) -> api_enums::PaymentMethodType { match self { Self::Fps {} => api_enums::PaymentMethodType::Fps, Self::DuitNow {} => api_enums::PaymentMethodType::DuitNow, Self::PromptPay {} => api_enu...
crates/hyperswitch_domain_models/src/payment_method_data.rs
hyperswitch_domain_models
impl_block
114
rust
null
RealTimePaymentData
GetPaymentMethodType for
impl GetPaymentMethodType for for RealTimePaymentData
null
null
null
null
null
null
null
null
#[macro_export] macro_rules! capture_method_not_supported { ($connector:expr, $capture_method:expr) => { Err(errors::ConnectorError::NotSupported { message: format!("{} for selected payment method", $capture_method), connector: $connector, } .into()) }; ($conn...
crates/router/src/core/errors.rs
router
macro
123
rust
null
null
null
null
null
null
null
null
declarative
null
null
null
File: crates/hyperswitch_domain_models/src/merchant_key_store.rs Public structs: 1 use common_utils::{ crypto::Encryptable, custom_serde, date_time, errors::{CustomResult, ValidationError}, type_name, types::keymanager::{self, KeyManagerState}, }; use error_stack::ResultExt; use masking::{PeekInte...
crates/hyperswitch_domain_models/src/merchant_key_store.rs
hyperswitch_domain_models
full_file
525
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct PayboxMeta { pub connector_request_id: String, }
crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs
hyperswitch_connectors
struct_definition
15
rust
PayboxMeta
null
null
null
null
null
null
null
null
null
null
null
pub async fn external_vault_proxy_for_payments_core<F, Res, Req, Op, FData, D>( state: SessionState, req_state: ReqState, merchant_context: domain::MerchantContext, profile: domain::Profile, operation: Op, req: Req, payment_id: id_type::GlobalPaymentId, call_connector_action: CallConnect...
crates/router/src/core/payments.rs
router
function_signature
523
rust
null
null
null
null
external_vault_proxy_for_payments_core
null
null
null
null
null
null
null
pub fn get_tokenize_connector_id( &self, ) -> Result<id_type::MerchantConnectorAccountId, error_stack::Report<errors::ValidationError>> { self.psp_tokenization .clone() .get_required_value("psp_tokenization") .map(|psp| psp.connector_id) }
crates/api_models/src/payment_methods.rs
api_models
function_signature
70
rust
null
null
null
null
get_tokenize_connector_id
null
null
null
null
null
null
null
pub async fn contract_based_routing_setup_config() {}
crates/openapi/src/routes/routing.rs
openapi
function_signature
10
rust
null
null
null
null
contract_based_routing_setup_config
null
null
null
null
null
null
null
pub fn get_network_token_data(&self) -> Option<payment_method_data::NetworkTokenData> { match self { Self::Card(_card_data) => None, Self::NetworkToken(network_token_data) => Some(network_token_data.clone()), Self::CardAndNetworkToken(vault_data) => Some(vault_data.network_to...
crates/hyperswitch_domain_models/src/payments.rs
hyperswitch_domain_models
function_signature
77
rust
null
null
null
null
get_network_token_data
null
null
null
null
null
null
null
impl ConnectorCommon for Bamboraapac { fn id(&self) -> &'static str { "bamboraapac" } fn get_currency_unit(&self) -> api::CurrencyUnit { api::CurrencyUnit::Minor } fn common_get_content_type(&self) -> &'static str { "text/xml" } fn base_url<'a>(&self, connectors: &...
crates/hyperswitch_connectors/src/connectors/bamboraapac.rs
hyperswitch_connectors
impl_block
437
rust
null
Bamboraapac
ConnectorCommon for
impl ConnectorCommon for for Bamboraapac
null
null
null
null
null
null
null
null
#[cfg(feature = "v2")] #[derive( Clone, Debug, serde::Deserialize, serde::Serialize, Eq, PartialEq, diesel::AsExpression, )] #[diesel(sql_type = diesel::pg::sql_types::Jsonb)] pub struct PaymentAttemptFeatureMetadata { pub revenue_recovery: Option<PaymentAttemptRecoveryData>, } #[cfg(feature = "v2")] #[derive(...
crates/diesel_models/src/payment_attempt.rs#chunk4
diesel_models
chunk
1,158
null
null
null
null
null
null
null
null
null
null
null
null
null
impl ConnectorCommon for Hyperwallet { fn id(&self) -> &'static str { "hyperwallet" } fn get_currency_unit(&self) -> api::CurrencyUnit { api::CurrencyUnit::Base } fn common_get_content_type(&self) -> &'static str { "application/json" } fn base_url<'a>(&self, connec...
crates/hyperswitch_connectors/src/connectors/hyperwallet.rs
hyperswitch_connectors
impl_block
390
rust
null
Hyperwallet
ConnectorCommon for
impl ConnectorCommon for for Hyperwallet
null
null
null
null
null
null
null
null
pub struct PlaidOptions { request_refund_details: bool, iban: Option<Secret<String>>, bacs: Option<PlaidBacs>, scheme: String, }
crates/hyperswitch_connectors/src/connectors/plaid/transformers.rs
hyperswitch_connectors
struct_definition
40
rust
PlaidOptions
null
null
null
null
null
null
null
null
null
null
null
pub async fn update_with_specific_fields( conn: &PgPooledConn, identifier: &common_utils::id_type::MerchantId, merchant_account: MerchantAccountUpdateInternal, ) -> StorageResult<Self> { generics::generic_update_with_unique_predicate_get_result::< <Self as HasTable>::Tabl...
crates/diesel_models/src/query/merchant_account.rs
diesel_models
function_signature
106
rust
null
null
null
null
update_with_specific_fields
null
null
null
null
null
null
null
File: crates/router/src/core/payments/operations/payment_attempt_record.rs Public structs: 1 use std::marker::PhantomData; use api_models::{enums::FrmSuggestion, payments::PaymentsAttemptRecordRequest}; use async_trait::async_trait; use common_utils::{ errors::CustomResult, ext_traits::{AsyncExt, Encode, Val...
crates/router/src/core/payments/operations/payment_attempt_record.rs
router
full_file
2,762
null
null
null
null
null
null
null
null
null
null
null
null
null
pub fn get_acs_reference_number(&self) -> Option<String> { if let Self::Challenge(challenge_params) = self { challenge_params.acs_reference_number.clone() } else { None } }
crates/hyperswitch_domain_models/src/router_request_types/authentication.rs
hyperswitch_domain_models
function_signature
48
rust
null
null
null
null
get_acs_reference_number
null
null
null
null
null
null
null
pub struct MerchantConnectorAccountUpdateInternal { pub connector_type: Option<storage_enums::ConnectorType>, pub connector_account_details: Option<Encryption>, pub connector_label: Option<String>, pub disabled: Option<bool>, #[diesel(deserialize_as = super::OptionalDieselArray<common_types::payment...
crates/diesel_models/src/merchant_connector_account.rs
diesel_models
struct_definition
263
rust
MerchantConnectorAccountUpdateInternal
null
null
null
null
null
null
null
null
null
null
null
File: crates/router/src/types/api/fraud_check_v2.rs pub use hyperswitch_domain_models::router_flow_types::fraud_check::{ Checkout, Fulfillment, RecordReturn, Sale, Transaction, }; pub use hyperswitch_interfaces::api::fraud_check_v2::{ FraudCheckCheckoutV2, FraudCheckFulfillmentV2, FraudCheckRecordReturnV2, Fra...
crates/router/src/types/api/fraud_check_v2.rs
router
full_file
99
null
null
null
null
null
null
null
null
null
null
null
null
null
impl api::Payment for Helcim {}
crates/hyperswitch_connectors/src/connectors/helcim.rs
hyperswitch_connectors
impl_block
9
rust
null
Helcim
api::Payment for
impl api::Payment for for Helcim
null
null
null
null
null
null
null
null
pub struct DwollaRefundSyncResponse { id: String, status: DwollaPaymentStatus, amount: DwollaAmount, }
crates/hyperswitch_connectors/src/connectors/dwolla/transformers.rs
hyperswitch_connectors
struct_definition
30
rust
DwollaRefundSyncResponse
null
null
null
null
null
null
null
null
null
null
null
File: crates/router/tests/connectors/wise.rs use hyperswitch_domain_models::address::{Address, AddressDetails}; use masking::Secret; use router::{ types, types::{api, storage::enums, PaymentAddress}, }; use crate::{ connector_auth, utils::{self, ConnectorActions, PaymentInfo}, }; struct WiseTest; im...
crates/router/tests/connectors/wise.rs
router
full_file
1,073
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct OrderRequestAmount { pub currency_code: storage_enums::Currency, pub value: StringMajorUnit, pub breakdown: AmountBreakdown, }
crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs
hyperswitch_connectors
struct_definition
34
rust
OrderRequestAmount
null
null
null
null
null
null
null
null
null
null
null
File: crates/common_utils/src/macros.rs Public functions: 4 //! Utility macros #[allow(missing_docs)] #[macro_export] macro_rules! newtype_impl { ($is_pub:vis, $name:ident, $ty_path:path) => { impl core::ops::Deref for $name { type Target = $ty_path; fn deref(&self) -> &Self::Tar...
crates/common_utils/src/macros.rs
common_utils
full_file
6,927
null
null
null
null
null
null
null
null
null
null
null
null
null
pub async fn get_sankey_data( clickhouse_client: &ClickhouseClient, auth: &AuthInfo, time_range: &TimeRange, ) -> MetricsResult<Vec<SankeyRow>> { let mut query_builder = QueryBuilder::<ClickhouseClient>::new(AnalyticsCollection::PaymentIntentSessionized); query_builder .add_select_co...
crates/analytics/src/payment_intents/sankey.rs
analytics
function_signature
527
rust
null
null
null
null
get_sankey_data
null
null
null
null
null
null
null
pub async fn delete_by_merchant_id_payment_method_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, payment_method_id: &str, ) -> StorageResult<Self> { generics::generic_delete_one_with_result::<<Self as HasTable>::Table, _, Self>( conn, ...
crates/diesel_models/src/query/payment_method.rs
diesel_models
function_signature
114
rust
null
null
null
null
delete_by_merchant_id_payment_method_id
null
null
null
null
null
null
null
impl api::RefundSync for Checkbook {}
crates/hyperswitch_connectors/src/connectors/checkbook.rs
hyperswitch_connectors
impl_block
10
rust
null
Checkbook
api::RefundSync for
impl api::RefundSync for for Checkbook
null
null
null
null
null
null
null
null
impl EmailClient for NoEmailClient { 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...
crates/external_services/src/email/no_email.rs
external_services
impl_block
139
rust
null
NoEmailClient
EmailClient for
impl EmailClient for for NoEmailClient
null
null
null
null
null
null
null
null
impl webhooks::IncomingWebhook for Nexixpay { fn get_webhook_object_reference_id( &self, _request: &webhooks::IncomingWebhookRequestDetails<'_>, ) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> { Err(report!(errors::ConnectorError::WebhooksNotImplemented...
crates/hyperswitch_connectors/src/connectors/nexixpay.rs
hyperswitch_connectors
impl_block
211
rust
null
Nexixpay
webhooks::IncomingWebhook for
impl webhooks::IncomingWebhook for for Nexixpay
null
null
null
null
null
null
null
null
impl ProcessTrackerNew { #[instrument(skip(conn))] pub async fn insert_process(self, conn: &PgPooledConn) -> StorageResult<ProcessTracker> { generics::generic_insert(conn, self).await } }
crates/diesel_models/src/query/process_tracker.rs
diesel_models
impl_block
49
rust
null
ProcessTrackerNew
null
impl ProcessTrackerNew
null
null
null
null
null
null
null
null
pub struct Authorization { pub authorization_id: String, pub merchant_id: common_utils::id_type::MerchantId, pub payment_id: common_utils::id_type::PaymentId, pub amount: MinorUnit, #[serde(with = "common_utils::custom_serde::iso8601")] pub created_at: PrimitiveDateTime, #[serde(with = "comm...
crates/diesel_models/src/authorization.rs
diesel_models
struct_definition
148
rust
Authorization
null
null
null
null
null
null
null
null
null
null
null
File: crates/api_models/src/locker_migration.rs Public structs: 1 #[derive(Debug, Clone, serde::Serialize)] #[serde(rename_all = "camelCase")] pub struct MigrateCardResponse { pub status_message: String, pub status_code: String, pub customers_moved: usize, pub cards_moved: usize, }
crates/api_models/src/locker_migration.rs
api_models
full_file
74
null
null
null
null
null
null
null
null
null
null
null
null
null
impl ConnectorValidation for Bluesnap { fn validate_connector_against_payment_request( &self, capture_method: Option<enums::CaptureMethod>, _payment_method: enums::PaymentMethod, _pmt: Option<enums::PaymentMethodType>, ) -> CustomResult<(), errors::ConnectorError> { let c...
crates/hyperswitch_connectors/src/connectors/bluesnap.rs
hyperswitch_connectors
impl_block
404
rust
null
Bluesnap
ConnectorValidation for
impl ConnectorValidation for for Bluesnap
null
null
null
null
null
null
null
null
impl DisputeMetricsAccumulator { pub fn collect(self) -> DisputeMetricsBucketValue { let (challenge_rate, won_rate, lost_rate, total_dispute) = self.disputes_status_rate.collect().unwrap_or_default(); DisputeMetricsBucketValue { disputes_challenged: challenge_rate, ...
crates/analytics/src/disputes/accumulators.rs
analytics
impl_block
114
rust
null
DisputeMetricsAccumulator
null
impl DisputeMetricsAccumulator
null
null
null
null
null
null
null
null
pub fn server(state: AppState) -> Scope { let mut route = web::scope("/payment_methods").app_data(web::Data::new(state)); #[cfg(feature = "olap")] { route = route.service(web::resource("/filter").route( web::get().to( paymen...
crates/router/src/routes/app.rs
router
function_signature
595
rust
null
null
null
null
server
null
null
null
null
null
null
null
Option<storage_enums::PaymentMethodType>, ), ) -> Result<Self, Self::Error> { let is_manual_capture = is_manual_capture(capture_method); let (status, error, payment_response_data) = match item.response { AdyenPaymentResponse::Response(response) => { ge...
crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs#chunk5
hyperswitch_connectors
chunk
8,182
null
null
null
null
null
null
null
null
null
null
null
null
null
pub async fn get_customer_mandates( state: web::Data<AppState>, req: HttpRequest, path: web::Path<id_type::CustomerId>, ) -> impl Responder { let flow = Flow::CustomersGetMandates; let customer_id = path.into_inner(); Box::pin(api::server_wrap( flow, state, &req, ...
crates/router/src/routes/customers.rs
router
function_signature
233
rust
null
null
null
null
get_customer_mandates
null
null
null
null
null
null
null
pub fn get_nti_and_card_details_for_mit_flow( recurring_details: mandates::RecurringDetails, ) -> Option<(api_models::payments::MandateReferenceId, Self)> { let network_transaction_id_and_card_details = match recurring_details { mandates::RecurringDetails::NetworkTransactionIdAndCardDeta...
crates/hyperswitch_domain_models/src/payment_method_data.rs
hyperswitch_domain_models
function_signature
203
rust
null
null
null
null
get_nti_and_card_details_for_mit_flow
null
null
null
null
null
null
null
impl api::MandateSetup for Trustpay {}
crates/hyperswitch_connectors/src/connectors/trustpay.rs
hyperswitch_connectors
impl_block
11
rust
null
Trustpay
api::MandateSetup for
impl api::MandateSetup for for Trustpay
null
null
null
null
null
null
null
null
pub async fn perform_static_routing_v1( state: &SessionState, merchant_id: &common_utils::id_type::MerchantId, algorithm_id: Option<&common_utils::id_type::RoutingId>, business_profile: &domain::Profile, transaction_data: &routing::TransactionData<'_>, ) -> RoutingResult<( Vec<routing_types::Rou...
crates/router/src/core/payments/routing.rs
router
function_signature
1,003
rust
null
null
null
null
perform_static_routing_v1
null
null
null
null
null
null
null
pub async fn call_surcharge_decision_management_for_session_flow( _state: &SessionState, _merchant_context: &domain::MerchantContext, _payment_attempt: &storage::PaymentAttempt, _payment_intent: &storage::PaymentIntent, _billing_address: Option<hyperswitch_domain_models::address::Address>, _sess...
crates/router/src/core/payments.rs
router
function_signature
102
rust
null
null
null
null
call_surcharge_decision_management_for_session_flow
null
null
null
null
null
null
null
pub struct BreadpayRouterData<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/breadpay/transformers.rs
hyperswitch_connectors
struct_definition
50
rust
BreadpayRouterData
null
null
null
null
null
null
null
null
null
null
null
pub fn build_form_from_struct<T: Serialize>(data: T) -> Result<Form, common_errors::ParsingError> { let mut form = Form::new(); let serialized = serde_json::to_value(&data).map_err(|e| { router_env::logger::error!("Error serializing data to JSON value: {:?}", e); common_errors::ParsingError::Enc...
crates/hyperswitch_connectors/src/connectors/fiuu.rs
hyperswitch_connectors
function_signature
245
rust
null
null
null
null
build_form_from_struct
null
null
null
null
null
null
null
impl api::PaymentSync for Aci {}
crates/hyperswitch_connectors/src/connectors/aci.rs
hyperswitch_connectors
impl_block
9
rust
null
Aci
api::PaymentSync for
impl api::PaymentSync for for Aci
null
null
null
null
null
null
null
null
File: crates/router/src/workflows/attach_payout_account_workflow.rs Public structs: 1 use common_utils::{ consts::DEFAULT_LOCALE, ext_traits::{OptionExt, ValueExt}, }; use scheduler::{ consumer::{self, workflows::ProcessTrackerWorkflow}, errors, }; use crate::{ core::payouts, errors as core_e...
crates/router/src/workflows/attach_payout_account_workflow.rs
router
full_file
530
null
null
null
null
null
null
null
null
null
null
null
null
null
pub async fn delete_tokenized_data_api( state: web::Data<AppState>, req: HttpRequest, path: web::Path<id_type::GlobalTokenId>, json_payload: web::Json<api_models::tokenization::DeleteTokenDataRequest>, ) -> HttpResponse { let flow = Flow::TokenizationDelete; let payload = json_payload.into_inner...
crates/router/src/routes/tokenization.rs
router
function_signature
274
rust
null
null
null
null
delete_tokenized_data_api
null
null
null
null
null
null
null
pub async fn get_merchant_scoped_metadata_from_db( state: &SessionState, merchant_id: id_type::MerchantId, org_id: id_type::OrganizationId, metadata_keys: Vec<DBEnum>, ) -> UserResult<Vec<DashboardMetadata>> { state .store .find_merchant_scoped_dashboard_metadata(&merchant_id, &org_i...
crates/router/src/utils/user/dashboard_metadata.rs
router
function_signature
112
rust
null
null
null
null
get_merchant_scoped_metadata_from_db
null
null
null
null
null
null
null
File: crates/analytics/src/sdk_events/core.rs Public functions: 3 use std::collections::HashMap; use api_models::analytics::{ sdk_events::{ MetricsBucketResponse, SdkEventMetrics, SdkEventMetricsBucketIdentifier, SdkEventsRequest, }, AnalyticsMetadata, GetSdkEventFiltersRequest, GetSdkEventMetric...
crates/analytics/src/sdk_events/core.rs
analytics
full_file
1,396
null
null
null
null
null
null
null
null
null
null
null
null
null
impl<'a> ContextValue<'a> { #[inline] pub fn assertion(value: &'a dir::DirValue, metadata: &'a Metadata) -> Self { Self { value: CtxValueKind::Assertion(value), metadata, } } #[inline] pub fn negation(values: &'a [dir::DirValue], metadata: &'a Metadata) -> Se...
crates/euclid/src/dssa/types.rs
euclid
impl_block
108
rust
null
ContextValue
null
impl ContextValue
null
null
null
null
null
null
null
null
pub fn convert_to_mandate_update( self, storage_scheme: MerchantStorageScheme, ) -> MandateUpdateInternal { let mut updated_object = MandateUpdateInternal::from(self); updated_object.updated_by = Some(storage_scheme.to_string()); updated_object }
crates/diesel_models/src/mandate.rs
diesel_models
function_signature
60
rust
null
null
null
null
convert_to_mandate_update
null
null
null
null
null
null
null
pub struct GenericBraintreeRequest<T> { query: String, variables: T, }
crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs
hyperswitch_connectors
struct_definition
21
rust
GenericBraintreeRequest
null
null
null
null
null
null
null
null
null
null
null
pub struct GooglePayTransactionInfo { pub country_code: api_models::enums::CountryAlpha2, pub currency_code: api_models::enums::Currency, pub total_price_status: String, pub total_price: StringMajorUnit, }
crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs
hyperswitch_connectors
struct_definition
51
rust
GooglePayTransactionInfo
null
null
null
null
null
null
null
null
null
null
null
impl SdkEventMetricAccumulator for AverageAccumulator { type MetricOutput = Option<f64>; fn add_metrics_bucket(&mut self, metrics: &SdkEventMetricRow) { let total = metrics .total .as_ref() .and_then(bigdecimal::ToPrimitive::to_u32); let count = metrics.count...
crates/analytics/src/sdk_events/accumulator.rs
analytics
impl_block
203
rust
null
AverageAccumulator
SdkEventMetricAccumulator for
impl SdkEventMetricAccumulator for for AverageAccumulator
null
null
null
null
null
null
null
null
pub struct PaymentPostSessionTokens;
crates/router/src/core/payments/operations/payment_post_session_tokens.rs
router
struct_definition
7
rust
PaymentPostSessionTokens
null
null
null
null
null
null
null
null
null
null
null
Documentation: api-reference/v1/api-key/api-key--create.mdx # Type: Doc File --- openapi: post /api_keys/{merchant_id} ---
api-reference/v1/api-key/api-key--create.mdx
null
doc_file
34
doc
null
null
null
null
null
null
null
null
null
null
null
null
pub fn new(merchant_id: String) -> UserResult<Self> { let merchant_id = merchant_id.trim().to_lowercase().replace(' ', "_"); let is_empty_or_whitespace = merchant_id.is_empty(); let is_all_valid_characters = merchant_id.chars().all(|x| x.is_alphanumeric() || x == '_'); if is_empty_or_wh...
crates/router/src/types/domain/user.rs
router
function_signature
110
rust
null
null
null
null
new
null
null
null
null
null
null
null
/// Constructor for ThemeLineage pub fn new( entity_type: EntityType, tenant_id: id_type::TenantId, org_id: id_type::OrganizationId, merchant_id: id_type::MerchantId, profile_id: id_type::ProfileId, ) -> Self { match entity_type { EntityType::Tenant =>...
crates/common_utils/src/types/user/theme.rs
common_utils
function_signature
149
rust
null
null
null
null
new
null
null
null
null
null
null
null
pub struct BlackhawknetworkRefundRequest { pub amount: StringMajorUnit, }
crates/hyperswitch_connectors/src/connectors/blackhawknetwork/transformers.rs
hyperswitch_connectors
struct_definition
18
rust
BlackhawknetworkRefundRequest
null
null
null
null
null
null
null
null
null
null
null
pub async fn get_mca_from_payment_intent( state: &SessionState, merchant_context: &domain::MerchantContext, payment_intent: PaymentIntent, connector_name: &str, ) -> CustomResult<domain::MerchantConnectorAccount, errors::ApiErrorResponse> { let db = &*state.store; let key_manager_state: &KeyMana...
crates/router/src/utils.rs
router
function_signature
618
rust
null
null
null
null
get_mca_from_payment_intent
null
null
null
null
null
null
null
pub fn new() -> Result<Self, errors::DrainerError> { Self::with_config_path(None) }
crates/drainer/src/settings.rs
drainer
function_signature
25
rust
null
null
null
null
new
null
null
null
null
null
null
null
impl api::PaymentVoid for Inespay {}
crates/hyperswitch_connectors/src/connectors/inespay.rs
hyperswitch_connectors
impl_block
10
rust
null
Inespay
api::PaymentVoid for
impl api::PaymentVoid for for Inespay
null
null
null
null
null
null
null
null
pub fn get_response_data(self) -> Box<dyn NetworkTokenWebhookResponseExt> { match self { Self::PanMetadataUpdate(data) => Box::new(data), Self::NetworkTokenMetadataUpdate(data) => Box::new(data), } }
crates/router/src/core/webhooks/network_tokenization_incoming.rs
router
function_signature
55
rust
null
null
null
null
get_response_data
null
null
null
null
null
null
null
Web Documentation: Testing Payments | Hyperswitch # Type: Web Doc Test payments through Newman wrapped in Rust To begin with, a fork of Newman needs to be installed by executing npm install -g ' This Newman fork has built-in support exporting and importing a postman collection in the form directory unlike having a sin...
https://docs.hyperswitch.io/learn-more/test-payments-through-newman-wrapped-in-rust
null
web_doc_file
686
doc
null
null
null
null
null
web
null
null
null
https://docs.hyperswitch.io/learn-more/test-payments-through-newman-wrapped-in-rust
Testing Payments | Hyperswitch
null
impl common_utils::events::ApiEventMetric for RelayResponse {}
crates/api_models/src/relay.rs
api_models
impl_block
13
rust
null
RelayResponse
common_utils::events::ApiEventMetric for
impl common_utils::events::ApiEventMetric for for RelayResponse
null
null
null
null
null
null
null
null
self, state: &SessionState, _merchant_id: &id_type::MerchantId, key_store: &domain::MerchantKeyStore, ) -> RouterResult<storage::MerchantAccountUpdate> { let key_manager_state = &state.into(); let key = key_store.key.get_inner().peek(); let merchant_details =...
crates/router/src/core/admin.rs#chunk1
router
chunk
8,185
null
null
null
null
null
null
null
null
null
null
null
null
null
impl common_utils::events::ApiEventMetric for ThreeDsDecisionRuleExecuteRequest { fn get_api_event_type(&self) -> Option<common_utils::events::ApiEventsType> { Some(common_utils::events::ApiEventsType::ThreeDsDecisionRule) } }
crates/api_models/src/three_ds_decision_rule.rs
api_models
impl_block
58
rust
null
ThreeDsDecisionRuleExecuteRequest
common_utils::events::ApiEventMetric for
impl common_utils::events::ApiEventMetric for for ThreeDsDecisionRuleExecuteRequest
null
null
null
null
null
null
null
null
impl api::PaymentToken for Redsys {}
crates/hyperswitch_connectors/src/connectors/redsys.rs
hyperswitch_connectors
impl_block
9
rust
null
Redsys
api::PaymentToken for
impl api::PaymentToken for for Redsys
null
null
null
null
null
null
null
null
pub async fn toggle_specific_dynamic_routing( state: SessionState, merchant_context: domain::MerchantContext, feature_to_enable: routing::DynamicRoutingFeatures, profile_id: common_utils::id_type::ProfileId, dynamic_routing_type: routing::DynamicRoutingType, ) -> RouterResponse<routing_types::Routin...
crates/router/src/core/routing.rs
router
function_signature
534
rust
null
null
null
null
toggle_specific_dynamic_routing
null
null
null
null
null
null
null
impl api::Payment for Blackhawknetwork {}
crates/hyperswitch_connectors/src/connectors/blackhawknetwork.rs
hyperswitch_connectors
impl_block
9
rust
null
Blackhawknetwork
api::Payment for
impl api::Payment for for Blackhawknetwork
null
null
null
null
null
null
null
null
File: crates/router/src/types/domain/user/decision_manager.rs Public functions: 10 Public structs: 2 use common_enums::TokenPurpose; use common_utils::{id_type, types::user::LineageContext}; use diesel_models::{ enums::{UserRoleVersion, UserStatus}, user_role::UserRole, }; use error_stack::ResultExt; use mas...
crates/router/src/types/domain/user/decision_manager.rs
router
full_file
3,689
null
null
null
null
null
null
null
null
null
null
null
null
null
impl Responder { let flow = AnalyticsFlow::GetApiEventFilters; Box::pin(api::server_wrap( flow, state.clone(), &req, json_payload.into_inner(), |state, auth: AuthenticationData, req, _| async move { analytics::api_event::get_fil...
crates/router/src/analytics.rs
router
impl_block
130
rust
null
Responder
null
impl Responder
null
null
null
null
null
null
null
null
pub fn get_test_card_details( connector_name: Connector, ) -> errors::RouterResult<Option<domain::Card>> { match connector_name { Connector::Stripe => Some(generate_card_from_details( "4242424242424242".to_string(), "2025".to_string(), "12".to_string(), "1...
crates/router/src/utils/verify_connector.rs
router
function_signature
175
rust
null
null
null
null
get_test_card_details
null
null
null
null
null
null
null
pub struct EventBuilder<T, A, E, D> where A: MessagingInterface<MessageClass = T>, E: Event<EventType = T, Data = D>, { message_sink: Arc<A>, metadata: HashMap<String, Value>, event: E, }
crates/events/src/lib.rs
events
struct_definition
59
rust
EventBuilder
null
null
null
null
null
null
null
null
null
null
null
impl api::MandateSetup for Xendit {}
crates/hyperswitch_connectors/src/connectors/xendit.rs
hyperswitch_connectors
impl_block
12
rust
null
Xendit
api::MandateSetup for
impl api::MandateSetup for for Xendit
null
null
null
null
null
null
null
null
pub struct ClientRiskInformation { rules: Option<Vec<ClientRiskInformationRules>>, profile: Option<Profile>, score: Option<Score>, info_codes: Option<InfoCodes>, }
crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs
hyperswitch_connectors
struct_definition
40
rust
ClientRiskInformation
null
null
null
null
null
null
null
null
null
null
null
File: crates/diesel_models/src/query/user_authentication_method.rs Public functions: 6 use diesel::{associations::HasTable, ExpressionMethods}; use crate::{ query::generics, schema::user_authentication_methods::dsl, user_authentication_method::*, PgPooledConn, StorageResult, }; impl UserAuthenticationMethod...
crates/diesel_models/src/query/user_authentication_method.rs
diesel_models
full_file
567
null
null
null
null
null
null
null
null
null
null
null
null
null
pub fn get_order_fulfillment_time(&self) -> Option<i64> { self.order_fulfillment_time }
crates/hyperswitch_domain_models/src/business_profile.rs
hyperswitch_domain_models
function_signature
28
rust
null
null
null
null
get_order_fulfillment_time
null
null
null
null
null
null
null
maud::html! { (maud::DOCTYPE) html { head { meta name="viewport" content="width=device-width, initial-scale=1"; } body style="background-color: #ffffff; padding: 20px; font-family: Arial, Hel...
crates/router/src/services/api.rs#chunk4
router
chunk
6,485
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct WalletRequest { flow: Flow, payment_method: PaymentMethod, }
crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs
hyperswitch_connectors
struct_definition
18
rust
WalletRequest
null
null
null
null
null
null
null
null
null
null
null
pub struct Memoization<V: ValueNode>( #[allow(clippy::type_complexity)] FxHashMap<(NodeId, Relation, Strength), Result<(), Arc<AnalysisTrace<V>>>>, );
crates/hyperswitch_constraint_graph/src/types.rs
hyperswitch_constraint_graph
struct_definition
40
rust
Memoization
null
null
null
null
null
null
null
null
null
null
null
pub struct FiservAuthType { pub(super) api_key: Secret<String>, pub(super) merchant_account: Secret<String>, pub(super) api_secret: Secret<String>, }
crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs
hyperswitch_connectors
struct_definition
39
rust
FiservAuthType
null
null
null
null
null
null
null
null
null
null
null
pub struct OrderFulfillmentTime(i64);
crates/api_models/src/admin.rs
api_models
struct_definition
11
rust
OrderFulfillmentTime
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.GsmRetrieveRequest { "type": "object", "required": [ "connector", "flow", "sub_flow", "code", "message" ], "properties": { "connector": { "$ref": "#/components/schemas/Connector" }, "flow": { "type": "string", "description"...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
193
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "GsmRetrieveRequest" ]
null
null
null
null
pub fn generate_env_specific_merchant_id(value: String) -> UserResult<id_type::MerchantId> { if matches!(env::which(), env::Env::Production) { let raw_id = domain::MerchantId::new(value)?; Ok(id_type::MerchantId::try_from(raw_id)?) } else { Ok(id_type::MerchantId::new_from_unix_timestamp...
crates/router/src/utils/user.rs
router
function_signature
85
rust
null
null
null
null
generate_env_specific_merchant_id
null
null
null
null
null
null
null
pub struct Details { pub field: String, pub reason: String, }
crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs
hyperswitch_connectors
struct_definition
17
rust
Details
null
null
null
null
null
null
null
null
null
null
null
impl api::PaymentSync for Amazonpay {}
crates/hyperswitch_connectors/src/connectors/amazonpay.rs
hyperswitch_connectors
impl_block
9
rust
null
Amazonpay
api::PaymentSync for
impl api::PaymentSync for for Amazonpay
null
null
null
null
null
null
null
null
impl api::PaymentCapture for Billwerk {}
crates/hyperswitch_connectors/src/connectors/billwerk.rs
hyperswitch_connectors
impl_block
9
rust
null
Billwerk
api::PaymentCapture for
impl api::PaymentCapture for for Billwerk
null
null
null
null
null
null
null
null