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 struct RefundSuccessCount;
crates/api_models/src/analytics/refunds.rs
api_models
struct_definition
7
rust
RefundSuccessCount
null
null
null
null
null
null
null
null
null
null
null
File: crates/storage_impl/src/payment_method.rs pub use diesel_models::payment_method::PaymentMethod; use crate::redis::kv_store::KvStorePartition; impl KvStorePartition for PaymentMethod {} use common_enums::enums::MerchantStorageScheme; use common_utils::{errors::CustomResult, id_type, types::keymanager::KeyManag...
crates/storage_impl/src/payment_method.rs
storage_impl
full_file
7,307
null
null
null
null
null
null
null
null
null
null
null
null
null
impl Theme { pub fn email_config(&self) -> EmailThemeConfig { EmailThemeConfig { primary_color: self.email_primary_color.clone(), foreground_color: self.email_foreground_color.clone(), background_color: self.email_background_color.clone(), entity_name: self.em...
crates/diesel_models/src/user/theme.rs
diesel_models
impl_block
79
rust
null
Theme
null
impl Theme
null
null
null
null
null
null
null
null
pub fn connector_mandate_details_migrated( &mut self, connector_mandate_details_migrated: Option<bool>, ) { self.connector_mandate_details_migrated = connector_mandate_details_migrated; }
crates/payment_methods/src/core/migration.rs
payment_methods
function_signature
50
rust
null
null
null
null
connector_mandate_details_migrated
null
null
null
null
null
null
null
pub async fn update_by_key( conn: &PgPooledConn, key: &str, config_update: ConfigUpdate, ) -> StorageResult<Self> { match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>( conn, key.to_owned(), ConfigUpdateInternal::from(config_...
crates/diesel_models/src/query/configs.rs
diesel_models
function_signature
157
rust
null
null
null
null
update_by_key
null
null
null
null
null
null
null
pub struct MockDb { pub addresses: Arc<Mutex<Vec<store::Address>>>, pub configs: Arc<Mutex<Vec<store::Config>>>, pub merchant_accounts: Arc<Mutex<Vec<store::MerchantAccount>>>, pub merchant_connector_accounts: Arc<Mutex<Vec<store::MerchantConnectorAccount>>>, pub payment_attempts: Arc<Mutex<Vec<Paym...
crates/storage_impl/src/mock_db.rs
storage_impl
struct_definition
653
rust
MockDb
null
null
null
null
null
null
null
null
null
null
null
pub struct StripeUpdateRefundRequest { #[serde(skip)] pub refund_id: String, pub metadata: Option<pii::SecretSerdeValue>, }
crates/router/src/compatibility/stripe/refunds/types.rs
router
struct_definition
34
rust
StripeUpdateRefundRequest
null
null
null
null
null
null
null
null
null
null
null
impl api::PaymentAuthorize for Bluecode {}
crates/hyperswitch_connectors/src/connectors/bluecode.rs
hyperswitch_connectors
impl_block
9
rust
null
Bluecode
api::PaymentAuthorize for
impl api::PaymentAuthorize for for Bluecode
null
null
null
null
null
null
null
null
impl Bambora { pub fn new() -> &'static Self { &Self { amount_convertor: &FloatMajorUnitForConnector, } } }
crates/hyperswitch_connectors/src/connectors/bambora.rs
hyperswitch_connectors
impl_block
36
rust
null
Bambora
null
impl Bambora
null
null
null
null
null
null
null
null
pub struct ChargebeeRecordPaymentRequest { #[serde(rename = "transaction[amount]")] pub amount: MinorUnit, #[serde(rename = "transaction[payment_method]")] pub payment_method: ChargebeeRecordPaymentMethod, #[serde(rename = "transaction[id_at_gateway]")] pub connector_payment_id: Option<String>, ...
crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs
hyperswitch_connectors
struct_definition
87
rust
ChargebeeRecordPaymentRequest
null
null
null
null
null
null
null
null
null
null
null
File: crates/hyperswitch_domain_models/src/authentication.rs Public structs: 2 use common_utils::{ crypto::Encryptable, encryption::Encryption, errors::CustomResult, pii, types::keymanager::ToEncryptable, }; use masking::Secret; use rustc_hash::FxHashMap; use serde_json::Value; #[cfg(feature = "v1")] #[deriv...
crates/hyperswitch_domain_models/src/authentication.rs
hyperswitch_domain_models
full_file
785
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct EventLogger {}
crates/router/src/events/event_logger.rs
router
struct_definition
5
rust
EventLogger
null
null
null
null
null
null
null
null
null
null
null
File: crates/router/src/utils/verify_connector.rs Public functions: 2 use api_models::enums::Connector; use error_stack::ResultExt; use crate::{core::errors, types::domain}; pub fn generate_card_from_details( card_number: String, card_exp_year: String, card_exp_month: String, card_cvv: String, ) -> ...
crates/router/src/utils/verify_connector.rs
router
full_file
411
null
null
null
null
null
null
null
null
null
null
null
null
null
File: crates/router/src/core/payments/flows/cancel_flow.rs use async_trait::async_trait; use super::{ConstructFlowSpecificData, Feature}; use crate::{ core::{ errors::{ConnectorErrorExt, RouterResult}, payments::{self, access_token, helpers, transformers, PaymentData}, }, routes::{metrics,...
crates/router/src/core/payments/flows/cancel_flow.rs
router
full_file
950
null
null
null
null
null
null
null
null
null
null
null
null
null
Web Documentation: Revenue Recovery | Hyperswitch # Type: Web Doc Revenue Recovery module of Hyperswitch is designed to act as a failsafe for recurring payments. It seamlessly integrates with merchants' existing subscription management systems and performs intelligent retries to recover failed transactions. With minim...
https://docs.hyperswitch.io/about-hyperswitch/payments-modules/revenue-recovery
null
web_doc_file
477
doc
null
null
null
null
null
web
null
null
null
https://docs.hyperswitch.io/about-hyperswitch/payments-modules/revenue-recovery
Revenue Recovery | Hyperswitch
null
pub fn get_merchant_key_store(&self) -> &MerchantKeyStore { match self { Self::NormalMerchant(merchant_account) => &merchant_account.1, } }
crates/hyperswitch_domain_models/src/merchant_context.rs
hyperswitch_domain_models
function_signature
40
rust
null
null
null
null
get_merchant_key_store
null
null
null
null
null
null
null
pub struct RefundResponse { id: String, status: RefundStatus, }
crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs
hyperswitch_connectors
struct_definition
19
rust
RefundResponse
null
null
null
null
null
null
null
null
null
null
null
impl api::RefundExecute for Mpgs {}
crates/hyperswitch_connectors/src/connectors/mpgs.rs
hyperswitch_connectors
impl_block
11
rust
null
Mpgs
api::RefundExecute for
impl api::RefundExecute for for Mpgs
null
null
null
null
null
null
null
null
pub struct Details { pub field: String, pub reason: String, }
crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs
hyperswitch_connectors
struct_definition
17
rust
Details
null
null
null
null
null
null
null
null
null
null
null
pub async fn signout(state: web::Data<AppState>, http_req: HttpRequest) -> HttpResponse { let flow = Flow::Signout; Box::pin(api::server_wrap( flow, state.clone(), &http_req, (), |state, user, _, _| user_core::signout(state, user), &auth::AnyPurposeOrLoginTokenAut...
crates/router/src/routes/user.rs
router
function_signature
100
rust
null
null
null
null
signout
null
null
null
null
null
null
null
impl api::ConnectorAccessToken for Nmi {}
crates/hyperswitch_connectors/src/connectors/nmi.rs
hyperswitch_connectors
impl_block
9
rust
null
Nmi
api::ConnectorAccessToken for
impl api::ConnectorAccessToken for for Nmi
null
null
null
null
null
null
null
null
impl<V: ValueNode> Memoization<V> { pub fn new() -> Self { Self(FxHashMap::default()) } }
crates/hyperswitch_constraint_graph/src/types.rs
hyperswitch_constraint_graph
impl_block
30
rust
null
Memoization
null
impl Memoization
null
null
null
null
null
null
null
null
pub fn get_verification_days_left(&self, state: &SessionState) -> UserResult<Option<i64>> { if self.0.is_verified { return Ok(None); } let allowed_unverified_duration = time::Duration::days(state.conf.email.allowed_unverified_days); let user_created = self.0.cre...
crates/router/src/types/domain/user.rs
router
function_signature
164
rust
null
null
null
null
get_verification_days_left
null
null
null
null
null
null
null
pub fn polymorphic_macro_derive_inner( input: syn::DeriveInput, ) -> syn::Result<proc_macro2::TokenStream> { let schemas_to_create = helpers::get_metadata_inner::<syn::Ident>("generate_schemas", &input.attrs)?; let fields = helpers::get_struct_fields(input.data) .map_err(|error| syn::Error:...
crates/router_derive/src/macros/generate_schema.rs
router_derive
function_signature
1,314
rust
null
null
null
null
polymorphic_macro_derive_inner
null
null
null
null
null
null
null
pub struct PaymentDistributionRow { pub currency: Option<DBEnumWrapper<storage_enums::Currency>>, pub status: Option<DBEnumWrapper<storage_enums::AttemptStatus>>, pub connector: Option<String>, pub authentication_type: Option<DBEnumWrapper<storage_enums::AuthenticationType>>, pub payment_method: Opt...
crates/analytics/src/payments/distribution.rs
analytics
struct_definition
297
rust
PaymentDistributionRow
null
null
null
null
null
null
null
null
null
null
null
pub struct RefundResponse { id: String, status: RefundStatus, }
crates/hyperswitch_connectors/src/connectors/phonepe/transformers.rs
hyperswitch_connectors
struct_definition
19
rust
RefundResponse
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.ContractBasedTimeScale { "type": "string", "enum": [ "day", "month" ] }
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
37
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "ContractBasedTimeScale" ]
null
null
null
null
pub async fn call_unified_connector_service_for_external_proxy<F, RouterDReq, ApiRequest, D>( state: &SessionState, req_state: ReqState, merchant_context: &domain::MerchantContext, _connector: api::ConnectorData, operation: &BoxedOperation<'_, F, ApiRequest, D>, payment_data: &mut D, custome...
crates/router/src/core/payments.rs
router
function_signature
539
rust
null
null
null
null
call_unified_connector_service_for_external_proxy
null
null
null
null
null
null
null
pub async fn make_frm_data_and_fraud_check_operation<F, D>( _db: &dyn StorageInterface, state: &SessionState, merchant_context: &domain::MerchantContext, payment_data: D, frm_routing_algorithm: FrmRoutingAlgorithm, profile_id: common_utils::id_type::ProfileId, frm_configs: FrmConfigsObject, ...
crates/router/src/core/fraud_check.rs
router
function_signature
147
rust
null
null
null
null
make_frm_data_and_fraud_check_operation
null
null
null
null
null
null
null
pub struct NovalnetSyncRequest { pub transaction: NovalnetSyncTransaction, pub custom: NovalnetCustom, }
crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs
hyperswitch_connectors
struct_definition
28
rust
NovalnetSyncRequest
null
null
null
null
null
null
null
null
null
null
null
pub fn from_relay_request(relay_request: relay_api_models::RelayRequest) -> RouterResult<Self> { match relay_request.data { Some(relay_api_models::RelayData::Refund(ref_data)) => Ok(Self { connector_resource_id: relay_request.connector_resource_id, connector_id: relay...
crates/router/src/core/relay.rs
router
function_signature
122
rust
null
null
null
null
from_relay_request
null
null
null
null
null
null
null
pub struct UnifiedAuthenticationServiceAuthenticateConfirmationResponse { status: String, }
crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs
hyperswitch_connectors
struct_definition
15
rust
UnifiedAuthenticationServiceAuthenticateConfirmationResponse
null
null
null
null
null
null
null
null
null
null
null
#[derive(serde::Serialize, serde::Deserialize, Clone, Debug, Default, Eq, PartialEq)] pub struct StripeMandateOptions { reference: Secret<String>, // Extendable, But only important field to be captured } /// Represents the capture request body for stripe connector. #[derive(Debug, Serialize, Clone, Copy)] pub struc...
crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs#chunk4
hyperswitch_connectors
chunk
7,487
null
null
null
null
null
null
null
null
null
null
null
null
null
impl api::PaymentSync for Fiuu {}
crates/hyperswitch_connectors/src/connectors/fiuu.rs
hyperswitch_connectors
impl_block
10
rust
null
Fiuu
api::PaymentSync for
impl api::PaymentSync for for Fiuu
null
null
null
null
null
null
null
null
impl WorldpayPaymentsRequestData for RouterData<SetupMandate, SetupMandateRequestData, PaymentsResponseData> { fn get_return_url(&self) -> Result<String, error_stack::Report<errors::ConnectorError>> { self.request.get_complete_authorize_url() } fn get_auth_type(&self) -> &enums::AuthenticationT...
crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs
hyperswitch_connectors
impl_block
379
rust
null
RouterData
WorldpayPaymentsRequestData for
impl WorldpayPaymentsRequestData for for RouterData
null
null
null
null
null
null
null
null
pub struct PaymentDetails { pub pan: cards::CardNumber, pub digital_card_id: Option<String>, pub payment_data_type: Option<String>, pub encrypted_src_card_details: Option<String>, pub card_expiry_month: Secret<String>, pub card_expiry_year: Secret<String>, pub cardholder_name: Option<Secret<...
crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs
hyperswitch_connectors
struct_definition
109
rust
PaymentDetails
null
null
null
null
null
null
null
null
null
null
null
impl DbConnectionParams for Database { fn get_username(&self) -> &str { &self.username } fn get_password(&self) -> Secret<String> { self.password.clone() } fn get_host(&self) -> &str { &self.host } fn get_port(&self) -> u16 { self.port } fn get_dbname(...
crates/drainer/src/settings.rs
drainer
impl_block
101
rust
null
Database
DbConnectionParams for
impl DbConnectionParams for for Database
null
null
null
null
null
null
null
null
impl UserAuthenticationMethod { pub async fn get_user_authentication_method_by_id( conn: &PgPooledConn, id: &str, ) -> StorageResult<Self> { generics::generic_find_by_id::<<Self as HasTable>::Table, _, _>(conn, id.to_owned()).await } pub async fn list_user_authentication_methods...
crates/diesel_models/src/query/user_authentication_method.rs
diesel_models
impl_block
461
rust
null
UserAuthenticationMethod
null
impl UserAuthenticationMethod
null
null
null
null
null
null
null
null
pub fn add_apple_pay_flow_metrics( apple_pay_flow: &Option<domain::ApplePayFlow>, connector: Option<String>, merchant_id: id_type::MerchantId, ) { if let Some(flow) = apple_pay_flow { match flow { domain::ApplePayFlow::Simplified(_) => metrics::APPLE_PAY_SIMPLIFIED_FLOW.add( ...
crates/router/src/utils.rs
router
function_signature
190
rust
null
null
null
null
add_apple_pay_flow_metrics
null
null
null
null
null
null
null
pub struct GlobalpayCancelRequest { pub amount: Option<StringMinorUnit>, }
crates/hyperswitch_connectors/src/connectors/globalpay/requests.rs
hyperswitch_connectors
struct_definition
17
rust
GlobalpayCancelRequest
null
null
null
null
null
null
null
null
null
null
null
/// Validate the configuration pub fn validate(&self) -> Result<(), RecoveryDeciderError> { use common_utils::fp_utils::when; when(self.base_url.is_empty(), || { Err(RecoveryDeciderError::ConfigError( "Recovery Decider base URL cannot be empty when configuration is provi...
crates/external_services/src/grpc_client/revenue_recovery/recovery_decider_client.rs
external_services
function_signature
80
rust
null
null
null
null
validate
null
null
null
null
null
null
null
pub struct DisputeEvidence { pub cancellation_policy: Option<String>, pub customer_communication: Option<String>, pub customer_signature: Option<String>, pub receipt: Option<String>, pub refund_policy: Option<String>, pub service_documentation: Option<String>, pub shipping_documentation: Opt...
crates/router/src/types/api/disputes.rs
router
struct_definition
96
rust
DisputeEvidence
null
null
null
null
null
null
null
null
null
null
null
impl EphemeralKey { pub fn server(config: AppState) -> Scope { web::scope("/v2/client-secret") .app_data(web::Data::new(config)) .service(web::resource("").route(web::post().to(client_secret_create))) .service(web::resource("/{id}").route(web::delete().to(client_secret_de...
crates/router/src/routes/app.rs
router
impl_block
78
rust
null
EphemeralKey
null
impl EphemeralKey
null
null
null
null
null
null
null
null
pub struct UpdateResourceParams<'a> { pub updateable: kv::Updateable, pub operation: Op<'a>, }
crates/storage_impl/src/kv_router_store.rs
storage_impl
struct_definition
28
rust
UpdateResourceParams
null
null
null
null
null
null
null
null
null
null
null
impl api::PaymentSync for Hipay {}
crates/hyperswitch_connectors/src/connectors/hipay.rs
hyperswitch_connectors
impl_block
9
rust
null
Hipay
api::PaymentSync for
impl api::PaymentSync for for Hipay
null
null
null
null
null
null
null
null
impl MerchantConnectorAccount { pub fn get_id(&self) -> id_type::MerchantConnectorAccountId { self.merchant_connector_id.clone() } pub fn get_connector_account_details( &self, ) -> error_stack::Result<router_data::ConnectorAuthType, common_utils::errors::ParsingError> { self....
crates/hyperswitch_domain_models/src/merchant_connector_account.rs
hyperswitch_domain_models
impl_block
194
rust
null
MerchantConnectorAccount
null
impl MerchantConnectorAccount
null
null
null
null
null
null
null
null
Documentation: api-reference/v1/refunds/refunds--list.mdx # Type: Doc File --- openapi: post /refunds/list ---
api-reference/v1/refunds/refunds--list.mdx
null
doc_file
32
doc
null
null
null
null
null
null
null
null
null
null
null
null
pub trait AppStateInfo { fn conf(&self) -> settings::Settings<RawSecret>; fn event_handler(&self) -> EventsHandler; #[cfg(feature = "email")] fn email_client(&self) -> Arc<Box<dyn EmailService>>; fn add_request_id(&mut self, request_id: RequestId); fn add_flow_name(&mut self, flow_name: String);...
crates/router/src/routes/app.rs
router
trait_definition
94
rust
null
null
AppStateInfo
null
null
null
null
null
null
null
null
null
pub struct UpdateThemeRequest { pub theme_data: Option<ThemeData>, pub email_config: Option<EmailThemeConfig>, }
crates/api_models/src/user/theme.rs
api_models
struct_definition
28
rust
UpdateThemeRequest
null
null
null
null
null
null
null
null
null
null
null
pub struct TrustpayRouterData<T> { pub amount: StringMajorUnit, pub router_data: T, }
crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs
hyperswitch_connectors
struct_definition
25
rust
TrustpayRouterData
null
null
null
null
null
null
null
null
null
null
null
pub struct Opennode { amount_convertor: &'static (dyn AmountConvertor<Output = MinorUnit> + Sync), }
crates/hyperswitch_connectors/src/connectors/opennode.rs
hyperswitch_connectors
struct_definition
28
rust
Opennode
null
null
null
null
null
null
null
null
null
null
null
pub async fn payments_post_session_tokens( state: web::Data<app::AppState>, req: actix_web::HttpRequest, json_payload: web::Json<payment_types::PaymentsPostSessionTokensRequest>, path: web::Path<common_utils::id_type::PaymentId>, ) -> impl Responder { let flow = Flow::PaymentsPostSessionTokens; ...
crates/router/src/routes/payments.rs
router
function_signature
380
rust
null
null
null
null
payments_post_session_tokens
null
null
null
null
null
null
null
pub struct NetworkResponse { pub endpoint: Option<String>, #[serde(default)] #[serde(rename = "networkField")] pub network_fields: Vec<NetworkField>, }
crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs
hyperswitch_connectors
struct_definition
37
rust
NetworkResponse
null
null
null
null
null
null
null
null
null
null
null
pub async fn get_org_payment_filters( state: web::Data<AppState>, req: actix_web::HttpRequest, json_payload: web::Json<GetPaymentFiltersRequest>, ) -> impl Responder { let flow = AnalyticsFlow::GetPaymentFilters; Box::pin(api::server_wrap( flow, state,...
crates/router/src/analytics.rs
router
function_signature
238
rust
null
null
null
null
get_org_payment_filters
null
null
null
null
null
null
null
impl VerifyIdForUpdateCustomer<'_> { async fn verify_id_and_get_customer_object( &self, db: &dyn StorageInterface, ) -> Result<domain::Customer, error_stack::Report<errors::CustomersErrorResponse>> { let customer = db .find_customer_by_global_id( self.key_mana...
crates/router/src/core/customers.rs
router
impl_block
106
rust
null
VerifyIdForUpdateCustomer
null
impl VerifyIdForUpdateCustomer
null
null
null
null
null
null
null
null
impl Responder { let flow = AnalyticsFlow::GetSankey; let payload = json_payload.into_inner(); Box::pin(api::server_wrap( flow, state, &req, payload, |state: crate::routes::SessionState, auth: AuthenticationData, req, _| async move { ...
crates/router/src/analytics.rs
router
impl_block
243
rust
null
Responder
null
impl Responder
null
null
null
null
null
null
null
null
pub struct DecisionEngineEliminationData { pub threshold: f64, }
crates/api_models/src/open_router.rs
api_models
struct_definition
17
rust
DecisionEngineEliminationData
null
null
null
null
null
null
null
null
null
null
null
pub struct PayoutListParams { pub offset: u32, pub starting_at: Option<PrimitiveDateTime>, pub ending_at: Option<PrimitiveDateTime>, pub connector: Option<Vec<api_models::enums::PayoutConnectors>>, pub currency: Option<Vec<storage_enums::Currency>>, pub status: Option<Vec<storage_enums::PayoutSt...
crates/hyperswitch_domain_models/src/payouts.rs
hyperswitch_domain_models
struct_definition
186
rust
PayoutListParams
null
null
null
null
null
null
null
null
null
null
null
pub fn get_profile_id(&self) -> Option<id_type::ProfileId> { let Self::List(pi_list_params) = self; pi_list_params.profile_id.clone() }
crates/hyperswitch_domain_models/src/payments/payment_intent.rs
hyperswitch_domain_models
function_signature
40
rust
null
null
null
null
get_profile_id
null
null
null
null
null
null
null
impl api::PaymentSync for Gocardless {}
crates/hyperswitch_connectors/src/connectors/gocardless.rs
hyperswitch_connectors
impl_block
10
rust
null
Gocardless
api::PaymentSync for
impl api::PaymentSync for for Gocardless
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.DecoupledAuthenticationType { "type": "string", "enum": [ "challenge", "frictionless" ] }
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
40
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "DecoupledAuthenticationType" ]
null
null
null
null
.attach_printable( "Failed to parse merchant_connector_details sent in request and then put in cache", )?; Ok(MerchantConnectorAccountType::CacheVal(res)) } None => { let mca: RouterResult<domain::Mercha...
crates/router/src/core/payments/helpers.rs#chunk4
router
chunk
8,188
null
null
null
null
null
null
null
null
null
null
null
null
null
File: crates/euclid/src/dssa/analyzer.rs Public functions: 3 //! 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 Doma...
crates/euclid/src/dssa/analyzer.rs
euclid
full_file
3,262
null
null
null
null
null
null
null
null
null
null
null
null
null
pub async fn add_publishable_key( state: &SessionState, api_key: Secret<String>, merchant_id: common_utils::id_type::MerchantId, expiry: Option<u64>, ) -> CustomResult<(), ApiClientError> { let decision_config = if let Some(config) = &state.conf.decision { config } else { return ...
crates/router/src/services/authentication/decision.rs
router
function_signature
163
rust
null
null
null
null
add_publishable_key
null
null
null
null
null
null
null
File: crates/analytics/src/refunds/metrics/sessionized_metrics/refund_error_message.rs use std::collections::HashSet; use api_models::analytics::{ refunds::{RefundDimensions, RefundFilters, RefundMetricsBucketIdentifier}, Granularity, TimeRange, }; use common_utils::errors::ReportSwitchExt; use diesel_models:...
crates/analytics/src/refunds/metrics/sessionized_metrics/refund_error_message.rs
analytics
full_file
1,277
null
null
null
null
null
null
null
null
null
null
null
null
null
impl ConnectorCommon for Gpayments { fn id(&self) -> &'static str { "gpayments" } fn get_currency_unit(&self) -> api::CurrencyUnit { api::CurrencyUnit::Minor // TODO! Check connector documentation, on which unit they are processing the currency. // If the connector acc...
crates/hyperswitch_connectors/src/connectors/gpayments.rs
hyperswitch_connectors
impl_block
410
rust
null
Gpayments
ConnectorCommon for
impl ConnectorCommon for for Gpayments
null
null
null
null
null
null
null
null
pub struct FacilitapayCustomerResponse { pub data: FacilitapaySubject, }
crates/hyperswitch_connectors/src/connectors/facilitapay/responses.rs
hyperswitch_connectors
struct_definition
20
rust
FacilitapayCustomerResponse
null
null
null
null
null
null
null
null
null
null
null
pub async fn migrate_customers( state: SessionState, customers_migration: Vec<payment_methods_domain::PaymentMethodCustomerMigrate>, merchant_context: domain::MerchantContext, ) -> errors::CustomerResponse<()> { for customer_migration in customers_migration { match create_customer( s...
crates/router/src/core/customers.rs
router
function_signature
140
rust
null
null
null
null
migrate_customers
null
null
null
null
null
null
null
impl SerializableSecret for u16 {}
crates/masking/src/serde.rs
masking
impl_block
8
rust
null
u16
SerializableSecret for
impl SerializableSecret for for u16
null
null
null
null
null
null
null
null
impl api::PaymentVoid for Bankofamerica {}
crates/hyperswitch_connectors/src/connectors/bankofamerica.rs
hyperswitch_connectors
impl_block
11
rust
null
Bankofamerica
api::PaymentVoid for
impl api::PaymentVoid for for Bankofamerica
null
null
null
null
null
null
null
null
pub fn get_payment_method(&self) -> Option<storage_enums::PaymentMethod> { // TODO: check if we can fix this Some(self.payment_method_type) }
crates/hyperswitch_domain_models/src/payments/payment_attempt.rs
hyperswitch_domain_models
function_signature
39
rust
null
null
null
null
get_payment_method
null
null
null
null
null
null
null
impl ValidateStatusForOperation for PaymentProxyIntent { /// Validate if the current operation can be performed on the current status of the payment intent fn validate_status_for_operation( &self, intent_status: common_enums::IntentStatus, ) -> Result<(), errors::ApiErrorResponse> { ...
crates/router/src/core/payments/operations/proxy_payments_intent.rs
router
impl_block
415
rust
null
PaymentProxyIntent
ValidateStatusForOperation for
impl ValidateStatusForOperation for for PaymentProxyIntent
null
null
null
null
null
null
null
null
impl ConnectorCommon for Jpmorgan { fn id(&self) -> &'static str { "jpmorgan" } fn get_currency_unit(&self) -> api::CurrencyUnit { api::CurrencyUnit::Minor } fn common_get_content_type(&self) -> &'static str { "application/json" } fn base_url<'a>(&self, connectors:...
crates/hyperswitch_connectors/src/connectors/jpmorgan.rs
hyperswitch_connectors
impl_block
327
rust
null
Jpmorgan
ConnectorCommon for
impl ConnectorCommon for for Jpmorgan
null
null
null
null
null
null
null
null
impl api::RefundSync for Fiserv {}
crates/hyperswitch_connectors/src/connectors/fiserv.rs
hyperswitch_connectors
impl_block
11
rust
null
Fiserv
api::RefundSync for
impl api::RefundSync for for Fiserv
null
null
null
null
null
null
null
null
pub struct FiservemeaExpiryDate { month: Secret<String>, year: Secret<String>, }
crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs
hyperswitch_connectors
struct_definition
24
rust
FiservemeaExpiryDate
null
null
null
null
null
null
null
null
null
null
null
pub struct NexiCardDetails { #[serde(flatten)] card_data: CardDataDetails, cof_contract: Option<CofContract>, }
crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs
hyperswitch_connectors
struct_definition
31
rust
NexiCardDetails
null
null
null
null
null
null
null
null
null
null
null
///Get payment_method_subtype pub fn get_payment_method_type(&self) -> Option<common_enums::PaymentMethodType> { Some(self.payment_method_subtype) }
crates/common_types/src/payment_methods.rs
common_types
function_signature
37
rust
null
null
null
null
get_payment_method_type
null
null
null
null
null
null
null
pub struct PayuRouterData<T> { pub amount: MinorUnit, pub router_data: T, }
crates/hyperswitch_connectors/src/connectors/payu/transformers.rs
hyperswitch_connectors
struct_definition
24
rust
PayuRouterData
null
null
null
null
null
null
null
null
null
null
null
pub async fn create_customer(&self) -> RouterResult<api::CustomerDetails> { let db = &*self.state.store; let customer_id = self .customer .customer_id .as_ref() .get_required_value("customer_id") .change_context(errors::ApiErrorResponse::Missin...
crates/router/src/core/payment_methods/tokenize/card_executor.rs
router
function_signature
715
rust
null
null
null
null
create_customer
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.LinkedRoutingConfigRetrieveResponse { "oneOf": [ { "$ref": "#/components/schemas/RoutingRetrieveResponse" }, { "type": "array", "items": { "$ref": "#/components/schemas/RoutingDictionaryRecord" } } ] }
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
74
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "LinkedRoutingConfigRetrieveResponse" ]
null
null
null
null
impl api::PaymentAuthorize for Forte {}
crates/hyperswitch_connectors/src/connectors/forte.rs
hyperswitch_connectors
impl_block
9
rust
null
Forte
api::PaymentAuthorize for
impl api::PaymentAuthorize for for Forte
null
null
null
null
null
null
null
null
/// value is NULL. The default value is provided by the `Default` trait implementation of `T`. pub struct RequiredFromNullableWithDefault<T>(T);
crates/diesel_models/src/lib.rs
diesel_models
struct_definition
33
rust
RequiredFromNullableWithDefault
null
null
null
null
null
null
null
null
null
null
null
/// Generate a new GlobalCustomerId from a cell id pub fn generate(cell_id: &crate::id_type::CellId) -> Self { let global_id = super::GlobalId::generate(cell_id, super::GlobalEntity::Customer); Self(global_id) }
crates/common_utils/src/id_type/global_id/customer.rs
common_utils
function_signature
58
rust
null
null
null
null
generate
null
null
null
null
null
null
null
pub struct PayuPaymentsSyncResponse { orders: Vec<PayuOrderResponseData>, status: PayuPaymentStatusData, properties: Option<Vec<PayuOrderResponseProperty>>, }
crates/hyperswitch_connectors/src/connectors/payu/transformers.rs
hyperswitch_connectors
struct_definition
41
rust
PayuPaymentsSyncResponse
null
null
null
null
null
null
null
null
null
null
null
File: crates/api_models/src/feature_matrix.rs Public structs: 5 use std::collections::HashSet; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; #[derive(Default, Debug, Deserialize, Serialize, Clone, ToSchema)] pub struct FeatureMatrixRequest { // List of connectors for which the feature matrix is req...
crates/api_models/src/feature_matrix.rs
api_models
full_file
881
null
null
null
null
null
null
null
null
null
null
null
null
null
Documentation: api-reference/v2/api-key/api-key--update.mdx # Type: Doc File --- openapi: put /v2/api-keys/{id} ---
api-reference/v2/api-key/api-key--update.mdx
null
doc_file
35
doc
null
null
null
null
null
null
null
null
null
null
null
null
pub struct PayoutEnabledPaymentMethodsInfo { pub payment_method: common_enums::PaymentMethod, pub payment_method_types_info: Vec<PaymentMethodTypeInfo>, }
crates/api_models/src/payouts.rs
api_models
struct_definition
35
rust
PayoutEnabledPaymentMethodsInfo
null
null
null
null
null
null
null
null
null
null
null
impl api::RefundExecute for Payeezy {}
crates/hyperswitch_connectors/src/connectors/payeezy.rs
hyperswitch_connectors
impl_block
11
rust
null
Payeezy
api::RefundExecute for
impl api::RefundExecute for for Payeezy
null
null
null
null
null
null
null
null
pub struct Customer { pub customer_id: id_type::CustomerId, pub merchant_id: id_type::MerchantId, #[encrypt] pub name: Option<Encryptable<Secret<String>>>, #[encrypt] pub email: Option<Encryptable<Secret<String, pii::EmailStrategy>>>, #[encrypt] pub phone: Option<Encryptable<Secret<Strin...
crates/hyperswitch_domain_models/src/customer.rs
hyperswitch_domain_models
struct_definition
198
rust
Customer
null
null
null
null
null
null
null
null
null
null
null
impl api::MandateSetup for Adyenplatform {}
crates/hyperswitch_connectors/src/connectors/adyenplatform.rs
hyperswitch_connectors
impl_block
12
rust
null
Adyenplatform
api::MandateSetup for
impl api::MandateSetup for for Adyenplatform
null
null
null
null
null
null
null
null
impl IncomingWebhook for Klarna { fn get_webhook_object_reference_id( &self, _request: &IncomingWebhookRequestDetails<'_>, ) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> { Err(report!(errors::ConnectorError::WebhooksNotImplemented)) } fn get_w...
crates/hyperswitch_connectors/src/connectors/klarna.rs
hyperswitch_connectors
impl_block
190
rust
null
Klarna
IncomingWebhook for
impl IncomingWebhook for for Klarna
null
null
null
null
null
null
null
null
pub struct BluecodePaymentsRequest { pub amount: FloatMajorUnit, pub currency: enums::Currency, pub payment_provider: String, pub shop_name: String, pub reference: String, pub ip_address: Option<Secret<String, IpAddress>>, pub first_name: Secret<String>, pub last_name: Secret<String>, ...
crates/hyperswitch_connectors/src/connectors/bluecode/transformers.rs
hyperswitch_connectors
struct_definition
137
rust
BluecodePaymentsRequest
null
null
null
null
null
null
null
null
null
null
null
pub async fn authentication_authenticate( state: web::Data<app::AppState>, req: HttpRequest, json_payload: web::Json<AuthenticationAuthenticateRequest>, path: web::Path<common_utils::id_type::AuthenticationId>, ) -> impl Responder { let flow = Flow::AuthenticationAuthenticate; let authentication...
crates/router/src/routes/authentication.rs
router
function_signature
289
rust
null
null
null
null
authentication_authenticate
null
null
null
null
null
null
null
impl api::ConnectorAccessToken for Mollie {}
crates/hyperswitch_connectors/src/connectors/mollie.rs
hyperswitch_connectors
impl_block
10
rust
null
Mollie
api::ConnectorAccessToken for
impl api::ConnectorAccessToken for for Mollie
null
null
null
null
null
null
null
null
pub async fn find_by_profile_id_connector_name( conn: &PgPooledConn, profile_id: &common_utils::id_type::ProfileId, connector_name: &str, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::profile_id ...
crates/diesel_models/src/query/merchant_connector_account.rs
diesel_models
function_signature
107
rust
null
null
null
null
find_by_profile_id_connector_name
null
null
null
null
null
null
null
impl<T> FromStr for DBEnumWrapper<T> where T: FromStr + Display, { type Err = Report<ParsingError>; fn from_str(s: &str) -> Result<Self, Self::Err> { T::from_str(s) .map_err(|_er| report!(ParsingError::EnumParseFailure(std::any::type_name::<T>()))) .map(DBEnumWrapper) ...
crates/analytics/src/types.rs
analytics
impl_block
108
rust
null
DBEnumWrapper
FromStr for
impl FromStr for for DBEnumWrapper
null
null
null
null
null
null
null
null
impl ConnectorValidation for ConnectorEnum { fn validate_connector_against_payment_request( &self, capture_method: Option<common_enums::CaptureMethod>, payment_method: common_enums::PaymentMethod, pmt: Option<common_enums::PaymentMethodType>, ) -> CustomResult<(), errors::Connect...
crates/hyperswitch_interfaces/src/connector_integration_interface.rs
hyperswitch_interfaces
impl_block
442
rust
null
ConnectorEnum
ConnectorValidation for
impl ConnectorValidation for for ConnectorEnum
null
null
null
null
null
null
null
null
pub fn is_success_rate_routing_enabled(&self) -> bool { self.success_based_algorithm .as_ref() .map(|success_based_routing| { success_based_routing.enabled_feature == DynamicRoutingFeatures::DynamicConnectorSelection || success_base...
crates/api_models/src/routing.rs
api_models
function_signature
74
rust
null
null
null
null
is_success_rate_routing_enabled
null
null
null
null
null
null
null
pub struct ProducerSettings { pub upper_fetch_limit: i64, pub lower_fetch_limit: i64, pub lock_key: String, pub lock_ttl: i64, pub batch_size: usize, }
crates/scheduler/src/settings.rs
scheduler
struct_definition
49
rust
ProducerSettings
null
null
null
null
null
null
null
null
null
null
null
pub struct CustomerUpdateRequest { /// The identifier for the Merchant Account #[schema(max_length = 255, example = "y3oqhf46pyzuxjbcn2giaqnb44")] #[serde(skip)] pub merchant_id: id_type::MerchantId, /// The customer's name #[schema(max_length = 255, value_type = Option<String>, example = "Jon T...
crates/api_models/src/customers.rs
api_models
struct_definition
454
rust
CustomerUpdateRequest
null
null
null
null
null
null
null
null
null
null
null