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 is_operation_allowed<Op: Debug>(operation: &Op) -> bool { ![ "PaymentSession", "PaymentApprove", "PaymentReject", "PaymentCapture", "PaymentsCancel", ] .contains(&format!("{operation:?}").as_str()) }
crates/router/src/core/fraud_check.rs
router
function_signature
63
rust
null
null
null
null
is_operation_allowed
null
null
null
null
null
null
null
impl Inespay { pub fn new() -> &'static Self { &Self { amount_converter: &StringMinorUnitForConnector, } } }
crates/hyperswitch_connectors/src/connectors/inespay.rs
hyperswitch_connectors
impl_block
35
rust
null
Inespay
null
impl Inespay
null
null
null
null
null
null
null
null
File: crates/storage_impl/src/redis/pub_sub.rs use std::sync::atomic; use error_stack::ResultExt; use redis_interface::{errors as redis_errors, PubsubInterface, RedisValue}; use router_env::{logger, tracing::Instrument}; use crate::redis::cache::{ CacheKey, CacheKind, CacheRedact, ACCOUNTS_CACHE, CGRAPH_CACHE, C...
crates/storage_impl/src/redis/pub_sub.rs
storage_impl
full_file
1,722
null
null
null
null
null
null
null
null
null
null
null
null
null
/// Asynchronously retrieves a HashiCorp Vault client based on the provided configuration. /// /// # Parameters /// /// - `config`: A reference to a `HashiCorpVaultConfig` containing the configuration details. pub async fn get_hashicorp_client( config: &HashiCorpVaultConfig, ) -> error_stack::Result<&'static HashiC...
crates/external_services/src/hashicorp_vault/core.rs
external_services
function_signature
109
rust
null
null
null
null
get_hashicorp_client
null
null
null
null
null
null
null
File: crates/analytics/src/payment_intents/metrics/payments_success_rate.rs use std::collections::HashSet; use api_models::analytics::{ payment_intents::{ PaymentIntentDimensions, PaymentIntentFilters, PaymentIntentMetricsBucketIdentifier, }, Granularity, TimeRange, }; use common_utils::errors::Re...
crates/analytics/src/payment_intents/metrics/payments_success_rate.rs
analytics
full_file
926
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct QuoteRequest { pub source_id: Secret<String>, pub source_currency_code: Currency, pub destination_currency_code: Currency, pub amount: FloatMajorUnit, pub include_fee: String, }
crates/hyperswitch_connectors/src/connectors/nomupay/transformers.rs
hyperswitch_connectors
struct_definition
45
rust
QuoteRequest
null
null
null
null
null
null
null
null
null
null
null
pub fn get_connector_image_link(self, base_url: &str) -> String { let image_name = match self { Self::PhonyPay => "PHONYPAY.svg", Self::FauxPay => "FAUXPAY.svg", Self::PretendPay => "PRETENDPAY.svg", Self::StripeTest => "STRIPE_TEST.svg", Self::PaypalT...
crates/router/src/routes/dummy_connector/types.rs
router
function_signature
116
rust
null
null
null
null
get_connector_image_link
null
null
null
null
null
null
null
pub struct TelemetryGuard { _log_guards: Vec<WorkerGuard>, }
crates/router_env/src/logger/setup.rs
router_env
struct_definition
18
rust
TelemetryGuard
null
null
null
null
null
null
null
null
null
null
null
pub async fn proxy_core( state: SessionState, merchant_context: domain::MerchantContext, req: proxy_api_models::ProxyRequest, ) -> RouterResponse<proxy_api_models::ProxyResponse> { let req_wrapper = utils::ProxyRequestWrapper(req.clone()); let proxy_record = req_wrapper .get_proxy_record( ...
crates/router/src/core/proxy.rs
router
function_signature
200
rust
null
null
null
null
proxy_core
null
null
null
null
null
null
null
Documentation: api-reference/v1/organization/organization--update.mdx # Type: Doc File --- openapi: put /organization/{id} ---
api-reference/v1/organization/organization--update.mdx
null
doc_file
32
doc
null
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.PaymentMethodCollectLinkResponse { "allOf": [ { "$ref": "#/components/schemas/GenericLinkUiConfig" }, { "type": "object", "required": [ "pm_collect_link_id", "customer_id", "expiry", "link" ], "properties"...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
497
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "PaymentMethodCollectLinkResponse" ]
null
null
null
null
pub async fn customers_retrieve() {}
crates/openapi/src/routes/customers.rs
openapi
function_signature
8
rust
null
null
null
null
customers_retrieve
null
null
null
null
null
null
null
pub struct ErrorResponse { pub code: String, pub message: String, pub reason: Option<String>, pub status_code: u16, pub attempt_status: Option<common_enums::enums::AttemptStatus>, pub connector_transaction_id: Option<String>, pub network_decline_code: Option<String>, pub network_advice_c...
crates/hyperswitch_domain_models/src/router_data.rs
hyperswitch_domain_models
struct_definition
101
rust
ErrorResponse
null
null
null
null
null
null
null
null
null
null
null
pub struct RefundResponse { id: String, state: RefundState, }
crates/hyperswitch_connectors/src/connectors/billwerk/transformers.rs
hyperswitch_connectors
struct_definition
19
rust
RefundResponse
null
null
null
null
null
null
null
null
null
null
null
impl<T: Eq + PartialEq + Clone + std::hash::Hash> std::hash::Hash for Maskable<T> { fn hash<H: std::hash::Hasher>(&self, state: &mut H) { match self { Self::Masked(value) => crate::PeekInterface::peek(value).hash(state), Self::Normal(value) => value.hash(state), } } }
crates/masking/src/maskable.rs
masking
impl_block
87
rust
null
Maskable
std::hash::Hash for
impl std::hash::Hash for for Maskable
null
null
null
null
null
null
null
null
impl<'a, K, V> Iterator for IterMut<'a, K, V> where K: EntityId, { type Item = (K, &'a mut V); fn next(&mut self) -> Option<Self::Item> { self.inner.next().map(|(id, val)| (K::with_id(id), val)) } }
crates/hyperswitch_constraint_graph/src/dense_map.rs
hyperswitch_constraint_graph
impl_block
78
rust
null
IterMut
Iterator for
impl Iterator for for IterMut
null
null
null
null
null
null
null
null
pub async fn get_payment_filters( state: web::Data<app::AppState>, req: actix_web::HttpRequest, ) -> impl Responder { let flow = Flow::PaymentsFilters; Box::pin(api::server_wrap( flow, state, &req, (), |state, auth: auth::AuthenticationData, _, _| { le...
crates/router/src/routes/payments.rs
router
function_signature
160
rust
null
null
null
null
get_payment_filters
null
null
null
null
null
null
null
File: crates/config_importer/src/cli.rs use std::path::PathBuf; /// Utility to import a hyperswitch TOML configuration file, convert it into environment variable /// key-value pairs, and export it in the specified format. #[derive(clap::Parser, Debug)] #[command(arg_required_else_help = true)] pub(crate) struct Args ...
crates/config_importer/src/cli.rs
config_importer
full_file
329
null
null
null
null
null
null
null
null
null
null
null
null
null
pub async fn find_optional_by_attempt_id_merchant_id( conn: &PgPooledConn, attempt_id: String, merchant_id: &common_utils::id_type::MerchantId, ) -> StorageResult<Option<Self>> { generics::generic_find_one_optional::<<Self as HasTable>::Table, _, _>( conn, dsl...
crates/diesel_models/src/query/dynamic_routing_stats.rs
diesel_models
function_signature
111
rust
null
null
null
null
find_optional_by_attempt_id_merchant_id
null
null
null
null
null
null
null
pub fn scope(&self) -> PermissionScope { match self { #(#scope_impl_per),* } }
crates/router_derive/src/macros/generate_permissions.rs
router_derive
function_signature
26
rust
null
null
null
null
scope
null
null
null
null
null
null
null
pub struct ApplepayPaymentMethod { display_name: String, network: String, #[serde(rename = "type")] token_type: String, }
crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs
hyperswitch_connectors
struct_definition
33
rust
ApplepayPaymentMethod
null
null
null
null
null
null
null
null
null
null
null
pub trait SdkEventMetric<T> where T: AnalyticsDataSource + SdkEventMetricAnalytics, { async fn load_metrics( &self, dimensions: &[SdkEventDimensions], publishable_key: &str, filters: &SdkEventFilters, granularity: Option<Granularity>, time_range: &TimeRange, ...
crates/analytics/src/sdk_events/metrics.rs
analytics
trait_definition
101
rust
null
null
SdkEventMetric
null
null
null
null
null
null
null
null
null
pub struct CaptureResponse { #[serde(rename = "@id")] pub id: String, #[serde(rename = "@reportGroup")] pub report_group: String, #[serde(rename = "@customerId", skip_serializing_if = "Option::is_none")] pub customer_id: Option<String>, #[serde(rename = "cnpTxnId")] pub cnp_txn_id: Strin...
crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs
hyperswitch_connectors
struct_definition
115
rust
CaptureResponse
null
null
null
null
null
null
null
null
null
null
null
File: crates/hyperswitch_domain_models/src/customer.rs Public functions: 4 Public structs: 4 use common_enums::enums::MerchantStorageScheme; #[cfg(feature = "v2")] use common_enums::DeleteStatus; use common_utils::{ crypto::{self, Encryptable}, date_time, encryption::Encryption, errors::{CustomResult...
crates/hyperswitch_domain_models/src/customer.rs
hyperswitch_domain_models
full_file
4,954
null
null
null
null
null
null
null
null
null
null
null
null
null
impl CustomerUpdateInternal { pub fn apply_changeset(self, source: Customer) -> Customer { let Self { name, email, phone, description, phone_country_code, metadata, connector_customer, address_id, def...
crates/diesel_models/src/customers.rs
diesel_models
impl_block
238
rust
null
CustomerUpdateInternal
null
impl CustomerUpdateInternal
null
null
null
null
null
null
null
null
impl SerializableSecret for i8 {}
crates/masking/src/serde.rs
masking
impl_block
7
rust
null
i8
SerializableSecret for
impl SerializableSecret for for i8
null
null
null
null
null
null
null
null
pub async fn payments_update_metadata( state: web::Data<app::AppState>, req: actix_web::HttpRequest, json_payload: web::Json<payment_types::PaymentsUpdateMetadataRequest>, path: web::Path<common_utils::id_type::PaymentId>, ) -> impl Responder { let flow = Flow::PaymentsUpdateMetadata; let payme...
crates/router/src/routes/payments.rs
router
function_signature
390
rust
null
null
null
null
payments_update_metadata
null
null
null
null
null
null
null
pub async fn get_authentication_connector_data( state: &SessionState, key_store: &domain::MerchantKeyStore, business_profile: &domain::Profile, authentication_connector: Option<String>, ) -> RouterResult<( common_enums::AuthenticationConnectors, payments::helpers::MerchantConnectorAccountType, )...
crates/router/src/core/authentication/utils.rs
router
function_signature
379
rust
null
null
null
null
get_authentication_connector_data
null
null
null
null
null
null
null
pub struct Association { pub avs_code: Option<String>, pub security_code_response: Option<String>, }
crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs
hyperswitch_connectors
struct_definition
23
rust
Association
null
null
null
null
null
null
null
null
null
null
null
File: crates/router/tests/refunds.rs #![allow(clippy::unwrap_used, clippy::print_stdout)] use utils::{mk_service, AppClient}; mod utils; // setting the connector in environment variables doesn't work when run in parallel. Neither does passing the paymentid // do we'll test refund and payment in same tests and later...
crates/router/tests/refunds.rs
router
full_file
669
null
null
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.SecretInfoToInitiateSdk { "type": "object", "required": [ "display", "payment" ], "properties": { "display": { "type": "string" }, "payment": { "type": "string" } } }
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
74
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "SecretInfoToInitiateSdk" ]
null
null
null
null
pub struct HubspotProxyConfig { /// The ID of the Hubspot form to be submitted. pub form_id: String, /// The URL to which the Hubspot form data will be sent. pub request_url: String, }
crates/external_services/src/crm.rs
external_services
struct_definition
50
rust
HubspotProxyConfig
null
null
null
null
null
null
null
null
null
null
null
impl api::RefundSync for Square {}
crates/hyperswitch_connectors/src/connectors/square.rs
hyperswitch_connectors
impl_block
9
rust
null
Square
api::RefundSync for
impl api::RefundSync for for Square
null
null
null
null
null
null
null
null
pub struct CybersourcePayoutFulfillRequest { client_reference_information: ClientReferenceInformation, order_information: OrderInformation, recipient_information: CybersourceRecipientInfo, sender_information: CybersourceSenderInfo, processing_information: CybersourceProcessingInfo, payment_infor...
crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs
hyperswitch_connectors
struct_definition
65
rust
CybersourcePayoutFulfillRequest
null
null
null
null
null
null
null
null
null
null
null
pub struct PaymentToFrmData { pub amount: Amount, pub payment_intent: PaymentIntent, pub payment_attempt: PaymentAttempt, pub merchant_account: MerchantAccount, pub address: PaymentAddress, pub connector_details: ConnectorDetailsCore, pub order_details: Option<Vec<OrderDetailsWithAmount>>, ...
crates/router/src/core/fraud_check/types.rs
router
struct_definition
78
rust
PaymentToFrmData
null
null
null
null
null
null
null
null
null
null
null
pub struct PaymentInitiation { pub ref_id: String, pub remittance_information_primary: MerchantId, pub amount: Amount, pub local_instrument: LocalInstrument, pub creditor: Creditor, pub callback_url: Option<String>, pub flow_type: FlowType, }
crates/hyperswitch_connectors/src/connectors/tokenio/transformers.rs
hyperswitch_connectors
struct_definition
63
rust
PaymentInitiation
null
null
null
null
null
null
null
null
null
null
null
pub fn get_pending_connector_capture_ids(&self) -> Vec<String> { let pending_connector_capture_ids = self .get_pending_captures() .into_iter() .filter_map(|capture| capture.get_optional_connector_transaction_id().cloned()) .collect(); pending_connector_cap...
crates/router/src/core/payments/types.rs
router
function_signature
66
rust
null
null
null
null
get_pending_connector_capture_ids
null
null
null
null
null
null
null
impl api::RefundExecute for Iatapay {}
crates/hyperswitch_connectors/src/connectors/iatapay.rs
hyperswitch_connectors
impl_block
12
rust
null
Iatapay
api::RefundExecute for
impl api::RefundExecute for for Iatapay
null
null
null
null
null
null
null
null
pub async fn config_key_delete( state: web::Data<AppState>, req: HttpRequest, path: web::Path<String>, ) -> impl Responder { let flow = Flow::ConfigKeyDelete; let key = path.into_inner(); api::server_wrap( flow, state, &req, key, |state, _, key, _| config...
crates/router/src/routes/configs.rs
router
function_signature
113
rust
null
null
null
null
config_key_delete
null
null
null
null
null
null
null
impl CustomerInterface for KafkaStore { type Error = errors::StorageError; #[cfg(feature = "v1")] async fn delete_customer_by_customer_id_merchant_id( &self, customer_id: &id_type::CustomerId, merchant_id: &id_type::MerchantId, ) -> CustomResult<bool, errors::StorageError> { ...
crates/router/src/db/kafka_store.rs
router
impl_block
1,380
rust
null
KafkaStore
CustomerInterface for
impl CustomerInterface for for KafkaStore
null
null
null
null
null
null
null
null
impl api::PaymentVoid for Dwolla {}
crates/hyperswitch_connectors/src/connectors/dwolla.rs
hyperswitch_connectors
impl_block
9
rust
null
Dwolla
api::PaymentVoid for
impl api::PaymentVoid for for Dwolla
null
null
null
null
null
null
null
null
pub fn handle_tokenization_response<F, Req>( resp: &mut types::RouterData<F, Req, types::PaymentsResponseData>, ) { let response = resp.response.clone(); if let Err(err) = response { if let Some(secret_metadata) = &err.connector_metadata { let metadata = secret_metadata.clone().expose();...
crates/router/src/core/payments/tokenization.rs
router
function_signature
133
rust
null
null
null
null
handle_tokenization_response
null
null
null
null
null
null
null
File: crates/router/src/db/user.rs use diesel_models::user as storage; use error_stack::report; use masking::Secret; use router_env::{instrument, tracing}; use super::{domain, MockDb}; use crate::{ connection, core::errors::{self, CustomResult}, services::Store, }; pub mod sample_data; pub mod theme; #[a...
crates/router/src/db/user.rs
router
full_file
2,579
null
null
null
null
null
null
null
null
null
null
null
null
null
File: crates/test_utils/tests/connectors/bambora_ui.rs use serial_test::serial; use thirtyfour::{prelude::*, WebDriver}; use crate::{selenium::*, tester}; struct BamboraSeleniumTest; impl SeleniumTest for BamboraSeleniumTest { fn get_connector_name(&self) -> String { "bambora".to_string() } } async...
crates/test_utils/tests/connectors/bambora_ui.rs
test_utils
full_file
239
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct Digitalvirgo { amount_converter: &'static (dyn AmountConvertor<Output = FloatMajorUnit> + Sync), }
crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs
hyperswitch_connectors
struct_definition
28
rust
Digitalvirgo
null
null
null
null
null
null
null
null
null
null
null
impl api::Refund for Thunes {}
crates/hyperswitch_connectors/src/connectors/thunes.rs
hyperswitch_connectors
impl_block
9
rust
null
Thunes
api::Refund for
impl api::Refund for for Thunes
null
null
null
null
null
null
null
null
pub fn get_id(&self) -> &common_utils::id_type::ProfileId { &self.id }
crates/diesel_models/src/business_profile.rs
diesel_models
function_signature
25
rust
null
null
null
null
get_id
null
null
null
null
null
null
null
pub struct NmiRefundRequest { #[serde(rename = "type")] transaction_type: TransactionType, security_key: Secret<String>, transactionid: String, orderid: String, amount: FloatMajorUnit, }
crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs
hyperswitch_connectors
struct_definition
50
rust
NmiRefundRequest
null
null
null
null
null
null
null
null
null
null
null
pub struct AirwallexCardDetails { expiry_month: Secret<String>, expiry_year: Secret<String>, number: cards::CardNumber, cvc: Secret<String>, }
crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs
hyperswitch_connectors
struct_definition
38
rust
AirwallexCardDetails
null
null
null
null
null
null
null
null
null
null
null
pub struct SavedPMLPaymentsInfo { pub payment_intent: storage::PaymentIntent, pub profile: domain::Profile, pub collect_cvv_during_payment: Option<primitive_wrappers::ShouldCollectCvvDuringPayment>, pub off_session_payment_flag: bool, pub is_connector_agnostic_mit_enabled: bool, }
crates/router/src/types/payment_methods.rs
router
struct_definition
70
rust
SavedPMLPaymentsInfo
null
null
null
null
null
null
null
null
null
null
null
impl PartialEq for ApiEventMetricsBucketIdentifier { fn eq(&self, other: &Self) -> bool { let mut left = DefaultHasher::new(); self.hash(&mut left); let mut right = DefaultHasher::new(); other.hash(&mut right); left.finish() == right.finish() } }
crates/api_models/src/analytics/api_event.rs
api_models
impl_block
70
rust
null
ApiEventMetricsBucketIdentifier
PartialEq for
impl PartialEq for for ApiEventMetricsBucketIdentifier
null
null
null
null
null
null
null
null
impl api::PaymentSession for Klarna {}
crates/hyperswitch_connectors/src/connectors/klarna.rs
hyperswitch_connectors
impl_block
9
rust
null
Klarna
api::PaymentSession for
impl api::PaymentSession for for Klarna
null
null
null
null
null
null
null
null
pub struct ChargebeeRecordbackInvoice { pub id: common_utils::id_type::PaymentReferenceId, }
crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs
hyperswitch_connectors
struct_definition
23
rust
ChargebeeRecordbackInvoice
null
null
null
null
null
null
null
null
null
null
null
pub async fn toggle_connector_agnostic_mit( state: web::Data<AppState>, req: HttpRequest, path: web::Path<( common_utils::id_type::MerchantId, common_utils::id_type::ProfileId, )
crates/router/src/routes/profiles.rs
router
function_signature
54
rust
null
null
null
null
toggle_connector_agnostic_mit
null
null
null
null
null
null
null
impl SdkEventMetricAccumulator for CountAccumulator { type MetricOutput = Option<u64>; #[inline] fn add_metrics_bucket(&mut self, metrics: &SdkEventMetricRow) { self.count = match (self.count, metrics.count) { (None, None) => None, (None, i @ Some(_)) | (i @ Some(_), None) =>...
crates/analytics/src/sdk_events/accumulator.rs
analytics
impl_block
143
rust
null
CountAccumulator
SdkEventMetricAccumulator for
impl SdkEventMetricAccumulator for for CountAccumulator
null
null
null
null
null
null
null
null
File: crates/router/src/types/api/configs.rs Public structs: 2 #[derive(Clone, serde::Serialize, Debug, serde::Deserialize)] pub struct Config { pub key: String, pub value: String, } #[derive(Clone, serde::Deserialize, Debug, serde::Serialize)] pub struct ConfigUpdate { #[serde(skip_deserializing)] p...
crates/router/src/types/api/configs.rs
router
full_file
88
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct NmiCaptureRequest { #[serde(rename = "type")] pub transaction_type: TransactionType, pub security_key: Secret<String>, pub transactionid: String, pub amount: Option<FloatMajorUnit>, }
crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs
hyperswitch_connectors
struct_definition
48
rust
NmiCaptureRequest
null
null
null
null
null
null
null
null
null
null
null
pub fn negation(values: &'a [dir::DirValue], metadata: &'a Metadata) -> Self { Self { value: CtxValueKind::Negation(values), metadata, } }
crates/euclid/src/dssa/types.rs
euclid
function_signature
45
rust
null
null
null
null
negation
null
null
null
null
null
null
null
File: crates/diesel_models/src/query/payment_method.rs Public functions: 17 use async_bb8_diesel::AsyncRunQueryDsl; #[cfg(feature = "v1")] use diesel::Table; use diesel::{ associations::HasTable, debug_query, pg::Pg, BoolExpressionMethods, ExpressionMethods, QueryDsl, }; use error_stack::ResultExt; use super::ge...
crates/diesel_models/src/query/payment_method.rs
diesel_models
full_file
2,340
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct GetnetCaptureRequest { pub payment: CapturePaymentData, }
crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs
hyperswitch_connectors
struct_definition
16
rust
GetnetCaptureRequest
null
null
null
null
null
null
null
null
null
null
null
impl api::PaymentToken for Elavon {}
crates/hyperswitch_connectors/src/connectors/elavon.rs
hyperswitch_connectors
impl_block
10
rust
null
Elavon
api::PaymentToken for
impl api::PaymentToken for for Elavon
null
null
null
null
null
null
null
null
pub async fn update_by_merchant_id_authentication_id( conn: &PgPooledConn, merchant_id: common_utils::id_type::MerchantId, authentication_id: common_utils::id_type::AuthenticationId, authorization_update: AuthenticationUpdate, ) -> StorageResult<Self> { match generics::generi...
crates/diesel_models/src/query/authentication.rs
diesel_models
function_signature
274
rust
null
null
null
null
update_by_merchant_id_authentication_id
null
null
null
null
null
null
null
pub struct PaymentsCancelData { pub amount: Option<i64>, pub currency: Option<storage_enums::Currency>, pub connector_transaction_id: String, pub cancellation_reason: Option<String>, pub connector_meta: Option<serde_json::Value>, pub browser_info: Option<BrowserInformation>, pub metadata: Op...
crates/hyperswitch_domain_models/src/router_request_types.rs
hyperswitch_domain_models
struct_definition
135
rust
PaymentsCancelData
null
null
null
null
null
null
null
null
null
null
null
impl ProfileWrapper { pub fn new(profile: domain::Profile) -> Self { Self { profile } } fn get_routing_config_cache_key(self) -> storage_impl::redis::cache::CacheKind<'static> { let merchant_id = self.profile.merchant_id.clone(); let profile_id = self.profile.get_id().to_owned(); ...
crates/router/src/core/admin.rs
router
impl_block
1,212
rust
null
ProfileWrapper
null
impl ProfileWrapper
null
null
null
null
null
null
null
null
impl Routing { pub fn server(state: AppState) -> Scope { web::scope("/v2/routing-algorithms") .app_data(web::Data::new(state.clone())) .service( web::resource("").route(web::post().to(|state, req, payload| { routing::routing_create_config(state, re...
crates/router/src/routes/app.rs
router
impl_block
115
rust
null
Routing
null
impl Routing
null
null
null
null
null
null
null
null
pub async fn get_connector_choice( state: &SessionState, merchant_context: &domain::MerchantContext, connector: Option<String>, routing_algorithm: Option<serde_json::Value>, payout_data: &mut PayoutData, eligible_connectors: Option<Vec<api_enums::PayoutConnectors>>, ) -> RouterResult<api::Connec...
crates/router/src/core/payouts.rs
router
function_signature
489
rust
null
null
null
null
get_connector_choice
null
null
null
null
null
null
null
File: crates/masking/src/strong_secret.rs Public functions: 1 Public structs: 1 //! Structure describing secret. use std::{fmt, marker::PhantomData}; use subtle::ConstantTimeEq; use zeroize::{self, Zeroize as ZeroizableSecret}; use crate::{strategy::Strategy, PeekInterface}; /// Secret thing. /// /// To get acce...
crates/masking/src/strong_secret.rs
masking
full_file
1,061
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct GetParentGroupsInfoQueryParams { pub entity_type: Option<EntityType>, }
crates/api_models/src/user_role/role.rs
api_models
struct_definition
19
rust
GetParentGroupsInfoQueryParams
null
null
null
null
null
null
null
null
null
null
null
pub struct MandateOption { #[serde(default, with = "common_utils::custom_serde::timestamp::option")] pub accepted_at: Option<PrimitiveDateTime>, pub user_agent: Option<String>, pub ip_address: Option<masking::Secret<String, IpAddress>>, pub mandate_type: Option<StripeMandateType>, pub amount: Op...
crates/router/src/compatibility/stripe/payment_intents/types.rs
router
struct_definition
140
rust
MandateOption
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.SdkNextAction { "type": "object", "required": [ "next_action" ], "properties": { "next_action": { "$ref": "#/components/schemas/NextActionCall" } } }
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
62
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "SdkNextAction" ]
null
null
null
null
impl Responder { let flow = AnalyticsFlow::GetSdkEvents; Box::pin(api::server_wrap( flow, state, &req, json_payload.into_inner(), |state, auth: AuthenticationData, req, _| async move { utils::check_if_profile_id_is_present_in_pa...
crates/router/src/analytics.rs
router
impl_block
171
rust
null
Responder
null
impl Responder
null
null
null
null
null
null
null
null
impl ConnectorValidation for Helcim { fn validate_connector_against_payment_request( &self, capture_method: Option<enums::CaptureMethod>, _payment_method: enums::PaymentMethod, _pmt: Option<enums::PaymentMethodType>, ) -> CustomResult<(), errors::ConnectorError> { let cap...
crates/hyperswitch_connectors/src/connectors/helcim.rs
hyperswitch_connectors
impl_block
155
rust
null
Helcim
ConnectorValidation for
impl ConnectorValidation for for Helcim
null
null
null
null
null
null
null
null
} #[derive(Deserialize, Debug, Serialize)] pub struct ActionResponse { #[serde(rename = "id")] pub action_id: String, pub amount: MinorUnit, #[serde(rename = "type")] pub action_type: ActionType, pub approved: Option<bool>, pub reference: Option<String>, } impl From<&ActionResponse> for en...
crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs#chunk1
hyperswitch_connectors
chunk
3,396
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct ThreeDsChallenge { pub reference: String, pub url: Url, pub jwt: Secret<String>, pub payload: Secret<String>, }
crates/hyperswitch_connectors/src/connectors/worldpay/response.rs
hyperswitch_connectors
struct_definition
33
rust
ThreeDsChallenge
null
null
null
null
null
null
null
null
null
null
null
state: &'a SessionState, connector: &'a api::ConnectorData, customer: &'a Option<domain::Customer>, merchant_connector_id: &'a domain::MerchantConnectorAccountTypeDetails, ) -> (bool, Option<&'a str>) { // Check if create customer is required for the connector match enums::PayoutConnectors::try_...
crates/router/src/core/payouts/helpers.rs#chunk1
router
chunk
4,321
null
null
null
null
null
null
null
null
null
null
null
null
null
File: crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs Public functions: 1 Public structs: 34 use std::str::FromStr; use common_enums::enums::CaptureMethod; use common_utils::types::MinorUnit; use error_stack::{report, ResultExt}; use hyperswitch_domain_models::{ payment_method_data::Paymen...
crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs
hyperswitch_connectors
full_file
5,809
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct EliminationAnalyserConfig { pub bucket_size: Option<u64>, pub bucket_leak_interval_in_secs: Option<u64>, }
crates/api_models/src/routing.rs
api_models
struct_definition
33
rust
EliminationAnalyserConfig
null
null
null
null
null
null
null
null
null
null
null
pub struct KafkaRefund<'a> { pub refund_id: &'a id_type::GlobalRefundId, pub merchant_reference_id: &'a id_type::RefundReferenceId, pub payment_id: &'a id_type::GlobalPaymentId, pub merchant_id: &'a id_type::MerchantId, pub connector_transaction_id: &'a types::ConnectorTransactionId, pub connect...
crates/router/src/services/kafka/refund.rs
router
struct_definition
479
rust
KafkaRefund
null
null
null
null
null
null
null
null
null
null
null
pub struct CustomerBankAccountResponse { pub id: Secret<String>, }
crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs
hyperswitch_connectors
struct_definition
15
rust
CustomerBankAccountResponse
null
null
null
null
null
null
null
null
null
null
null
pub fn server(state: AppState) -> Scope { web::scope("/analytics").app_data(web::Data::new(state)) }
crates/router/src/analytics.rs
router
function_signature
28
rust
null
null
null
null
server
null
null
null
null
null
null
null
File: crates/router_derive/src/lib.rs Public functions: 16 Public structs: 3 //! Utility macros for the `router` crate. #![warn(missing_docs)] use syn::parse_macro_input; use crate::macros::diesel::DieselEnumMeta; mod macros; /// Uses the [`Debug`][Debug] implementation of a type to derive its [`Display`][Display]...
crates/router_derive/src/lib.rs
router_derive
full_file
6,434
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct BillingDetails { country_code: Option<CountryAlpha2>, address_lines: Option<Vec<Secret<String>>>, family_name: Option<Secret<String>>, given_name: Option<Secret<String>>, postal_code: Option<Secret<String>>, }
crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs
hyperswitch_connectors
struct_definition
54
rust
BillingDetails
null
null
null
null
null
null
null
null
null
null
null
pub struct MerchantConnectorCreate { /// Type of the Connector for the financial use case. Could range from Payments to Accounting to Banking. #[schema(value_type = ConnectorType, example = "payment_processor")] pub connector_type: api_enums::ConnectorType, /// Name of the Connector #[schema(value_t...
crates/api_models/src/admin.rs
api_models
struct_definition
1,086
rust
MerchantConnectorCreate
null
null
null
null
null
null
null
null
null
null
null
impl api::MandateSetup for Digitalvirgo {}
crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs
hyperswitch_connectors
impl_block
12
rust
null
Digitalvirgo
api::MandateSetup for
impl api::MandateSetup for for Digitalvirgo
null
null
null
null
null
null
null
null
pub struct InespayPaymentWebhookData { pub single_payin_id: String, pub cod_status: InespayPSyncStatus, pub description: String, pub amount: MinorUnit, pub reference: String, pub creditor_account: Secret<String>, pub debtor_name: Secret<String>, pub debtor_account: Secret<String>, pu...
crates/hyperswitch_connectors/src/connectors/inespay/transformers.rs
hyperswitch_connectors
struct_definition
83
rust
InespayPaymentWebhookData
null
null
null
null
null
null
null
null
null
null
null
pub struct Card { number: cards::CardNumber, security_code: Secret<String>, expiry_date: ExpiryDate, }
crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs
hyperswitch_connectors
struct_definition
28
rust
Card
null
null
null
null
null
null
null
null
null
null
null
pub fn get_surcharge_keys() -> JsResult { let keys = <SurchargeDecisionConfigs as EuclidDirFilter>::ALLOWED; Ok(serde_wasm_bindgen::to_value(keys)?) }
crates/euclid_wasm/src/lib.rs
euclid_wasm
function_signature
44
rust
null
null
null
null
get_surcharge_keys
null
null
null
null
null
null
null
File: crates/redis_interface/src/commands.rs Public functions: 51 //! An interface to abstract the `fred` commands //! //! The folder provides generic functions for providing serialization //! and deserialization while calling redis. //! It also includes instruments to provide tracing. use std::fmt::Debug; use comm...
crates/redis_interface/src/commands.rs#chunk0
redis_interface
chunk
8,177
null
null
null
null
null
null
null
null
null
null
null
null
null
FiuuWebhooksResponse::FiuuWebhookRefundResponse(webhook_refund_response) => { Ok(Box::new(fiuu::FiuuRefundSyncResponse::Webhook( webhook_refund_response, ))) } } } fn get_mandate_details( &self, request: &webhoo...
crates/hyperswitch_connectors/src/connectors/fiuu.rs#chunk1
hyperswitch_connectors
chunk
1,372
null
null
null
null
null
null
null
null
null
null
null
null
null
impl ApiEventMetric for CurrencyConversionResponse {}
crates/api_models/src/currency.rs
api_models
impl_block
9
rust
null
CurrencyConversionResponse
ApiEventMetric for
impl ApiEventMetric for for CurrencyConversionResponse
null
null
null
null
null
null
null
null
pub async fn mk_basilisk_req( jwekey: &settings::Jwekey, jws: &str, locker_choice: api_enums::LockerChoice, ) -> CustomResult<encryption::JweBody, errors::VaultError> { let jws_payload: Vec<&str> = jws.split('.').collect(); let generate_jws_body = |payload: Vec<&str>| -> Option<encryption::JwsBody>...
crates/router/src/core/payment_methods/transformers.rs
router
function_signature
442
rust
null
null
null
null
mk_basilisk_req
null
null
null
null
null
null
null
pub struct TokenizedBankRedirectValue2 { pub customer_id: Option<id_type::CustomerId>, }
crates/api_models/src/payment_methods.rs
api_models
struct_definition
22
rust
TokenizedBankRedirectValue2
null
null
null
null
null
null
null
null
null
null
null
pub struct AuthipayRefundRequest { request_type: &'static str, transaction_amount: Amount, }
crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs
hyperswitch_connectors
struct_definition
23
rust
AuthipayRefundRequest
null
null
null
null
null
null
null
null
null
null
null
let jwe_body = response .unwrap_or_else(|err| err) .response .parse_struct::<services::JweBody>("JweBody") .change_context(errors::VaultError::ResponseDeserializationFailed) .attach_printable("Failed while parsing locker response into JweBody")?; let decrypted_payload = ...
crates/router/src/core/payment_methods/cards.rs#chunk2
router
chunk
8,189
null
null
null
null
null
null
null
null
null
null
null
null
null
impl api::Payment for Airwallex {}
crates/hyperswitch_connectors/src/connectors/airwallex.rs
hyperswitch_connectors
impl_block
9
rust
null
Airwallex
api::Payment for
impl api::Payment for for Airwallex
null
null
null
null
null
null
null
null
File: crates/scheduler/src/lib.rs pub mod configs; pub mod consumer; pub mod db; pub mod env; pub mod errors; pub mod flow; pub mod metrics; pub mod producer; pub mod scheduler; pub mod settings; pub mod utils; pub use self::{consumer::types, flow::*, scheduler::*};
crates/scheduler/src/lib.rs
scheduler
full_file
67
null
null
null
null
null
null
null
null
null
null
null
null
null
impl<V: ValueNode> Node<V> { pub(crate) fn new(node_type: NodeType<V>) -> Self { Self { node_type, preds: Vec::new(), succs: Vec::new(), } } }
crates/hyperswitch_constraint_graph/src/types.rs
hyperswitch_constraint_graph
impl_block
52
rust
null
Node
null
impl Node
null
null
null
null
null
null
null
null
pub async fn get_profile_id_for_mandate( state: &SessionState, merchant_context: &domain::MerchantContext, mandate: Mandate, ) -> CustomResult<common_utils::id_type::ProfileId, errors::ApiErrorResponse> { let profile_id = if let Some(ref payment_id) = mandate.original_payment_id { let pi = state...
crates/router/src/core/mandate/helpers.rs
router
function_signature
250
rust
null
null
null
null
get_profile_id_for_mandate
null
null
null
null
null
null
null
pub struct Configs;
crates/router/src/routes/app.rs
router
struct_definition
5
rust
Configs
null
null
null
null
null
null
null
null
null
null
null
impl api::PaymentVoid for Chargebee {}
crates/hyperswitch_connectors/src/connectors/chargebee.rs
hyperswitch_connectors
impl_block
9
rust
null
Chargebee
api::PaymentVoid for
impl api::PaymentVoid for for Chargebee
null
null
null
null
null
null
null
null