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 async fn transfer_user_key_store_keymanager(
state: SessionState,
req: user_api::UserKeyTransferRequest,
) -> UserResponse<user_api::UserTransferKeyResponse> {
let db = &state.global_store;
let key_stores = db
.get_all_user_key_store(
&(&state).into(),
&state.store.g... | crates/router/src/core/user.rs | router | function_signature | 163 | rust | null | null | null | null | transfer_user_key_store_keymanager | null | null | null | null | null | null | null |
File: crates/openapi/src/routes/profile.rs
Public functions: 14
// ******************************************** V1 profile routes ******************************************** //
#[cfg(feature = "v1")]
/// Profile - Create
///
/// Creates a new *profile* for a merchant
#[utoipa::path(
post,
path = "/account/{... | crates/openapi/src/routes/profile.rs | openapi | full_file | 2,925 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn list_users_in_lineage(
state: SessionState,
user_from_token: auth::UserFromToken,
request: user_role_api::ListUsersInEntityRequest,
) -> UserResponse<Vec<user_role_api::ListUsersInEntityResponse>> {
let requestor_role_info = roles::RoleInfo::from_role_id_org_id_tenant_id(
&state,
... | crates/router/src/core/user_role.rs | router | function_signature | 1,394 | rust | null | null | null | null | list_users_in_lineage | null | null | null | null | null | null | null |
File: crates/hyperswitch_interfaces/src/api/files.rs
//! Files interface
use hyperswitch_domain_models::{
router_flow_types::files::{Retrieve, Upload},
router_request_types::{RetrieveFileRequestData, UploadFileRequestData},
router_response_types::{RetrieveFileResponse, UploadFileResponse},
};
use crate::... | crates/hyperswitch_interfaces/src/api/files.rs | hyperswitch_interfaces | full_file | 302 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router_env/tests/test_module.rs
Public functions: 2
use router_env as logger;
#[tracing::instrument(skip_all)]
pub async fn fn_with_colon(val: i32) {
let a = 13;
let b = 31;
logger::log!(
logger::Level::WARN,
?a,
?b,
tag = ?logger::Tag::ApiIncomingRequest,
... | crates/router_env/tests/test_module.rs | router_env | full_file | 297 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PoEligibility; | crates/hyperswitch_domain_models/src/router_flow_types/payouts.rs | hyperswitch_domain_models | struct_definition | 7 | rust | PoEligibility | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_single_org_id(
state: &SessionState,
user_role: &UserRole,
) -> UserResult<id_type::OrganizationId> {
let (_, entity_type) = user_role
.get_entity_id_and_type()
.ok_or(UserErrors::InternalServerError)?;
match entity_type {
EntityType::Tenant => Ok(state
... | crates/router/src/utils/user_role.rs | router | function_signature | 204 | rust | null | null | null | null | get_single_org_id | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Paysafe {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&PAYSAFE_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*PAYSAFE_SUPPORTED_PAYMENT_METHODS)
}
fn get_supp... | crates/hyperswitch_connectors/src/connectors/paysafe.rs | hyperswitch_connectors | impl_block | 105 | rust | null | Paysafe | ConnectorSpecifications for | impl ConnectorSpecifications for for Paysafe | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/routing/routing--retrieve-config.mdx
# Type: Doc File
---
openapi: get /routing/active
--- | api-reference/v1/routing/routing--retrieve-config.mdx | null | doc_file | 33 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/santander.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct ProxyRequest {
/// The request body that needs to be forwarded
pub request_body: Value,
/// The destination URL where the request needs to be forwarded
#[schema(value_type = String, example = "https://api.example.com/endpoint")]
pub destination_url: url::Url,
/// The headers that need... | crates/api_models/src/proxy.rs | api_models | struct_definition | 208 | rust | ProxyRequest | null | null | null | null | null | null | null | null | null | null | null |
impl<T> DatabaseStore for KVRouterStore<T>
where
RouterStore<T>: DatabaseStore,
T: DatabaseStore,
{
type Config = (RouterStore<T>, String, u8, u32, Option<bool>);
async fn new(
config: Self::Config,
tenant_config: &dyn TenantConfig,
_test_transaction: bool,
) -> StorageResult... | crates/storage_impl/src/kv_router_store.rs | storage_impl | impl_block | 266 | rust | null | KVRouterStore | DatabaseStore for | impl DatabaseStore for for KVRouterStore | null | null | null | null | null | null | null | null |
impl BusinessPaymentLinkConfig {
pub fn validate(&self) -> Result<(), &str> {
let host_domain_valid = self
.domain_name
.clone()
.map(|host_domain| link_utils::validate_strict_domain(&host_domain))
.unwrap_or(true);
if !host_domain_valid {
... | crates/api_models/src/admin.rs | api_models | impl_block | 175 | rust | null | BusinessPaymentLinkConfig | null | impl BusinessPaymentLinkConfig | null | null | null | null | null | null | null | null |
pub struct MerchantAdvice {
code: Option<String>,
code_raw: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | MerchantAdvice | null | null | null | null | null | null | null | null | null | null | null |
pub struct MerchantAdvice {
code: Option<String>,
code_raw: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | MerchantAdvice | null | null | null | null | null | null | null | null | null | null | null |
pub async fn terminate_auth_select(
state: SessionState,
user_token: auth::UserFromSinglePurposeToken,
req: user_api::AuthSelectRequest,
) -> UserResponse<user_api::TokenResponse> {
let user_from_db: domain::UserFromStorage = state
.global_store
.find_user_by_id(&user_token.user_id)
... | crates/router/src/core/user.rs | router | function_signature | 421 | rust | null | null | null | null | terminate_auth_select | null | null | null | null | null | null | null |
/// Serialize event into a buffer of bytes using parent span.
pub fn event_serialize<S>(
&self,
span: Option<&SpanRef<'_, S>>,
event: &Event<'_>,
) -> std::io::Result<Vec<u8>>
where
S: Subscriber + for<'a> LookupSpan<'a>,
{
let mut buffer = Vec::new();
let... | crates/router_env/src/logger/formatter.rs | router_env | function_signature | 188 | rust | null | null | null | null | event_serialize | null | null | null | null | null | null | null |
File: crates/masking/src/abs.rs
//! Abstract data types.
use crate::Secret;
/// Interface to expose a reference to an inner secret
pub trait PeekInterface<S> {
/// Only method providing access to the secret value.
fn peek(&self) -> &S;
/// Provide a mutable reference to the inner value.
fn peek_mut(... | crates/masking/src/abs.rs | masking | full_file | 419 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_session_token_for_click_to_pay(
state: &SessionState,
merchant_id: &id_type::MerchantId,
merchant_context: &domain::MerchantContext,
authentication_product_ids: common_types::payments::AuthenticationConnectorAccountMap,
payment_intent: &payments::PaymentIntent,
profile_id: &id_t... | crates/router/src/core/payments.rs | router | function_signature | 778 | rust | null | null | null | null | get_session_token_for_click_to_pay | null | null | null | null | null | null | null |
impl ConnectorValidation for Itaubank {} | crates/hyperswitch_connectors/src/connectors/itaubank.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Itaubank | ConnectorValidation for | impl ConnectorValidation for for Itaubank | null | null | null | null | null | null | null | null |
File: crates/common_utils/src/types.rs
Public functions: 26
Public structs: 20
//! Types that can be used in other crates
pub mod keymanager;
/// Enum for Authentication Level
pub mod authentication;
/// User related types
pub mod user;
/// types that are wrappers around primitive types
pub mod primitive_wrappers;... | crates/common_utils/src/types.rs#chunk0 | common_utils | chunk | 8,180 | null | null | null | null | null | null | null | null | null | null | null | null | null |
payment_method_data: payment_data.get_payment_method_data().cloned(),
amount,
currency: currency.to_string(),
}))
} else {
let mut next_action_response = None;
// Early exit for terminal payment statuses - don't evaluate next_action at all
if paym... | crates/router/src/core/payments/transformers.rs#chunk3 | router | chunk | 8,184 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct CaptureResponse {
response_code: u8,
receipt: String,
declined_code: Option<String>,
declined_message: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs | hyperswitch_connectors | struct_definition | 32 | rust | CaptureResponse | null | null | null | null | null | null | null | null | null | null | null |
impl<const T: u8> ConnectorValidation for DummyConnector<T> {
fn validate_connector_against_payment_request(
&self,
capture_method: Option<CaptureMethod>,
_payment_method: PaymentMethod,
_pmt: Option<PaymentMethodType>,
) -> CustomResult<(), ConnectorError> {
let capture_... | crates/hyperswitch_connectors/src/connectors/dummyconnector.rs | hyperswitch_connectors | impl_block | 140 | rust | null | DummyConnector | ConnectorValidation for | impl ConnectorValidation for for DummyConnector | null | null | null | null | null | null | null | null |
/// Generate a new GlobalPaymentId from a cell id
pub fn generate(cell_id: &crate::id_type::CellId) -> Self {
let global_id = super::GlobalId::generate(cell_id, super::GlobalEntity::Payment);
Self(global_id)
} | crates/common_utils/src/id_type/global_id/payment.rs | common_utils | function_signature | 59 | rust | null | null | null | null | generate | null | null | null | null | null | null | null |
pub struct VoidResponse {
#[serde(rename = "@id")]
pub id: String,
#[serde(rename = "@reportGroup")]
pub report_group: String,
pub cnp_txn_id: String,
pub response: WorldpayvantivResponseCode,
pub response_time: String,
pub post_date: Option<String>,
pub message: String,
pub loca... | crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs | hyperswitch_connectors | struct_definition | 84 | rust | VoidResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn create_attempt_amount_details(
&self,
confirm_intent_request: &api_models::payments::PaymentsConfirmIntentRequest,
) -> payment_attempt::AttemptAmountDetails {
let net_amount = self.calculate_net_amount();
let surcharge_amount = match self.skip_surcharge_calculation {
... | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | function_signature | 305 | rust | null | null | null | null | create_attempt_amount_details | null | null | null | null | null | null | null |
pub struct ThreedsecureioAuthenticationRequest {
pub ds_start_protocol_version: String,
pub ds_end_protocol_version: String,
pub acs_start_protocol_version: String,
pub acs_end_protocol_version: String,
pub three_dsserver_trans_id: String,
pub acct_number: cards::CardNumber,
pub notification... | crates/hyperswitch_connectors/src/connectors/threedsecureio/transformers.rs | hyperswitch_connectors | struct_definition | 467 | rust | ThreedsecureioAuthenticationRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct ConnectNameForProfile<'a>(pub FxHashSet<&'a common_enums::connector_enums::Connector>); | crates/router/src/core/routing/helpers.rs | router | struct_definition | 27 | rust | ConnectNameForProfile | null | null | null | null | null | null | null | null | null | null | null |
pub struct Paypal {
/// Email linked with paypal account
#[schema(value_type = String, example = "john.doe@example.com")]
pub email: Option<Email>,
/// mobile number linked to paypal account
#[schema(value_type = String, example = "16608213349")]
pub telephone_number: Option<Secret<String>>,
... | crates/api_models/src/payouts.rs | api_models | struct_definition | 123 | rust | Paypal | null | null | null | null | null | null | null | null | null | null | null |
impl AddressConstructor for ShippingAddress {
fn new(
name: Option<Secret<String>>,
street: Option<Secret<String>>,
city: Option<String>,
post_code: Option<Secret<String>>,
country: Option<enums::CountryAlpha2>,
) -> Self {
Self {
name,
str... | crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs | hyperswitch_connectors | impl_block | 82 | rust | null | ShippingAddress | AddressConstructor for | impl AddressConstructor for for ShippingAddress | null | null | null | null | null | null | null | null |
pub async fn recovery_incoming_webhook_flow(
state: SessionState,
merchant_context: domain::MerchantContext,
business_profile: domain::Profile,
source_verified: bool,
connector_enum: &connector_integration_interface::ConnectorEnum,
billing_connector_account: hyperswitch_domain_models::merchant_c... | crates/router/src/core/webhooks/recovery_incoming.rs | router | function_signature | 1,142 | rust | null | null | null | null | recovery_incoming_webhook_flow | null | null | null | null | null | null | null |
impl api::PaymentsPreProcessing for Paypal {} | crates/hyperswitch_connectors/src/connectors/paypal.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Paypal | api::PaymentsPreProcessing for | impl api::PaymentsPreProcessing for for Paypal | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Bluesnap {} | crates/hyperswitch_connectors/src/connectors/bluesnap.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Bluesnap | api::PaymentVoid for | impl api::PaymentVoid for for Bluesnap | null | null | null | null | null | null | null | null |
impl TokenizationInterface for KafkaStore {
async fn insert_tokenization(
&self,
tokenization: hyperswitch_domain_models::tokenization::Tokenization,
merchant_key_store: &hyperswitch_domain_models::merchant_key_store::MerchantKeyStore,
key_manager_state: &KeyManagerState,
) -> Cu... | crates/router/src/db/kafka_store.rs | router | impl_block | 373 | rust | null | KafkaStore | TokenizationInterface for | impl TokenizationInterface for for KafkaStore | null | null | null | null | null | null | null | null |
pub async fn list_user_authentication_methods_for_owner_id(
conn: &PgPooledConn,
owner_id: &str,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<<Self as HasTable>::Table, _, _, _>(
conn,
dsl::owner_id.eq(owner_id.to_owned()),
None,
... | crates/diesel_models/src/query/user_authentication_method.rs | diesel_models | function_signature | 93 | rust | null | null | null | null | list_user_authentication_methods_for_owner_id | null | null | null | null | null | null | null |
pub struct EmailSettings {
/// The AWS region to send SES requests to.
pub aws_region: String,
/// Number of days for verification of the email
pub allowed_unverified_days: i64,
/// Sender email
pub sender_email: String,
#[serde(flatten)]
/// The client specific configurations
pub... | crates/external_services/src/email.rs | external_services | struct_definition | 121 | rust | EmailSettings | null | null | null | null | null | null | null | null | null | null | null |
pub struct EventDetails {
#[serde(rename = "type")]
pub event_type: EventType,
pub transaction_reference: String,
/// Mandate's token
pub token: Option<MandateToken>,
/// Network transaction ID
pub scheme_reference: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/worldpay/response.rs | hyperswitch_connectors | struct_definition | 61 | rust | EventDetails | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_api_event_dimensions() -> Vec<NameDescription> {
ApiEventDimensions::iter().map(Into::into).collect()
} | crates/analytics/src/utils.rs | analytics | function_signature | 30 | rust | null | null | null | null | get_api_event_dimensions | null | null | null | null | null | null | null |
pub async fn setup_mandate_preprocessing_steps<F: Clone>(
state: &SessionState,
router_data: &types::RouterData<F, types::SetupMandateRequestData, types::PaymentsResponseData>,
confirm: bool,
connector: &api::ConnectorData,
) -> RouterResult<types::RouterData<F, types::SetupMandateRequestData, types::Pa... | crates/router/src/core/payments/flows/setup_mandate_flow.rs | router | function_signature | 478 | rust | null | null | null | null | setup_mandate_preprocessing_steps | null | null | null | null | null | null | null |
pub async fn payment_intents_capture(
state: web::Data<routes::AppState>,
qs_config: web::Data<serde_qs::Config>,
req: HttpRequest,
form_payload: web::Bytes,
path: web::Path<common_utils::id_type::PaymentId>,
) -> HttpResponse {
let stripe_payload: payment_types::PaymentsCaptureRequest = match q... | crates/router/src/compatibility/stripe/payment_intents.rs | router | function_signature | 467 | rust | null | null | null | null | payment_intents_capture | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/adyenplatform/transformers.rs
Public structs: 2
use common_utils::types::MinorUnit;
use error_stack::Report;
use hyperswitch_domain_models::router_data::ConnectorAuthType;
use hyperswitch_interfaces::errors::ConnectorError;
use masking::Secret;
use serde::Serialize;
... | crates/hyperswitch_connectors/src/connectors/adyenplatform/transformers.rs | hyperswitch_connectors | full_file | 332 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PriorityLogicData
{
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": true
},
"status": {
"type": "string",
"nullable": true
},
"failure_reason": {
"type": "string",
"nullable": true
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 89 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PriorityLogicData"
] | null | null | null | null |
impl super::routing_events::events::RoutingEventLogAnalytics for ClickhouseClient {} | crates/analytics/src/clickhouse.rs | analytics | impl_block | 17 | rust | null | ClickhouseClient | super::routing_events::events::RoutingEventLogAnalytics for | impl super::routing_events::events::RoutingEventLogAnalytics for for ClickhouseClient | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentsCreateResponseOpenApi
{
"type": "object",
"required": [
"payment_id",
"merchant_id",
"status",
"amount",
"net_amount",
"amount_capturable",
"currency",
"payment_method",
"attempt_count"
],
"properties": {
"payment_id": {
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 5,065 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentsCreateResponseOpenApi"
] | null | null | null | null |
pub struct PaymentMetricsBucketIdentifier {
pub currency: Option<Currency>,
pub status: Option<AttemptStatus>,
pub connector: Option<String>,
#[serde(rename = "authentication_type")]
pub auth_type: Option<AuthenticationType>,
pub payment_method: Option<String>,
pub payment_method_type: Optio... | crates/api_models/src/analytics/payments.rs | api_models | struct_definition | 240 | rust | PaymentMetricsBucketIdentifier | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CardNetworkTokenizeRequest
{
"allOf": [
{
"$ref": "#/components/schemas/TokenizeDataRequest"
},
{
"type": "object",
"required": [
"merchant_id",
"customer"
],
"properties": {
"merchant_id": {
"type": "st... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 294 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CardNetworkTokenizeRequest"
] | null | null | null | null |
OpenAPI Block Path: components.schemas.PazeSessionTokenResponse
{
"type": "object",
"required": [
"client_id",
"client_name",
"client_profile_id",
"transaction_currency_code",
"transaction_amount"
],
"properties": {
"client_id": {
"type": "string",
"description": "Paze Client... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 253 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PazeSessionTokenResponse"
] | null | null | null | null |
File: crates/router/src/db/merchant_account.rs
#[cfg(feature = "olap")]
use std::collections::HashMap;
use common_utils::{ext_traits::AsyncExt, types::keymanager::KeyManagerState};
use diesel_models::MerchantAccountUpdateInternal;
use error_stack::{report, ResultExt};
use router_env::{instrument, tracing};
#[cfg(feat... | crates/router/src/db/merchant_account.rs | router | full_file | 5,905 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/// Uses the [`Serialize`] implementation of a type to derive a function implementation
/// for converting nested keys structure into a HashMap of key, value where key is in
/// the flattened form.
///
/// Example
///
/// ```
/// #[derive(Default, Serialize, FlatStruct)]
/// pub struct User {
/// name: String,
/// ... | crates/router_derive/src/lib.rs | router_derive | macro | 522 | rust | null | null | null | null | null | null | null | null | proc_derive | null | null | null |
impl api::PaymentVoid for Forte {} | crates/hyperswitch_connectors/src/connectors/forte.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Forte | api::PaymentVoid for | impl api::PaymentVoid for for Forte | null | null | null | null | null | null | null | null |
pub fn get_headers(&self) -> Vec<(String, masking::Maskable<String>)> {
self.0
.headers
.as_map()
.iter()
.map(|(key, value)| (key.clone(), value.clone().into_masked()))
.collect()
} | crates/router/src/core/proxy/utils.rs | router | function_signature | 64 | rust | null | null | null | null | get_headers | null | null | null | null | null | null | null |
pub async fn delete_payment_method(
state: SessionState,
pm_id: api::PaymentMethodId,
merchant_context: domain::MerchantContext,
profile: domain::Profile,
) -> RouterResponse<api::PaymentMethodDeleteResponse> {
let pm_id = id_type::GlobalPaymentMethodId::generate_from_string(pm_id.payment_method_id)... | crates/router/src/core/payment_methods.rs | router | function_signature | 135 | rust | null | null | null | null | delete_payment_method | null | null | null | null | null | null | null |
pub struct Card {
number: cards::CardNumber,
expiry_month: Secret<String>,
expiry_year: Secret<String>,
cvc: Secret<String>,
holder_name: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/silverflow/transformers.rs | hyperswitch_connectors | struct_definition | 43 | rust | Card | null | null | null | null | null | null | null | null | null | null | null |
pub struct DwollaRouterData<'a, T> {
pub amount: StringMajorUnit,
pub router_data: T,
pub base_url: &'a str,
} | crates/hyperswitch_connectors/src/connectors/dwolla/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | DwollaRouterData | null | null | null | null | null | null | null | null | null | null | null |
impl FromStr for MerchantConnectorAccountId {
type Err = std::fmt::Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
Self::try_from(std::borrow::Cow::Owned(s.to_string())).map_err(|_| std::fmt::Error)
}
} | crates/common_utils/src/id_type/merchant_connector_account.rs | common_utils | impl_block | 65 | rust | null | MerchantConnectorAccountId | FromStr for | impl FromStr for for MerchantConnectorAccountId | null | null | null | null | null | null | null | null |
pub async fn get_and_deserialize_key<T>(
db: &dyn StorageInterface,
key: &str,
type_name: &'static str,
) -> CustomResult<T, RedisError>
where
T: serde::de::DeserializeOwned,
{
use common_utils::ext_traits::ByteSliceExt;
let bytes = db.get_key(key).await?;
bytes
.parse_struct(type_n... | crates/router/src/db.rs | router | function_signature | 101 | rust | null | null | null | null | get_and_deserialize_key | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/getnet.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use api_models::webhooks::IncomingWebhookEvent;
use base64::{self, Engine};
use common_enums::enums;
use common_utils::{
consts::BASE64_ENGINE,
crypto,
errors... | crates/hyperswitch_connectors/src/connectors/getnet.rs | hyperswitch_connectors | full_file | 6,764 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CustomerDevicePlatform
{
"type": "string",
"enum": [
"web",
"android",
"ios"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 40 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CustomerDevicePlatform"
] | null | null | null | null |
pub struct RefundResponse {
id: String,
status: RefundStatus,
} | crates/hyperswitch_connectors/src/connectors/sift/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | RefundResponse | null | null | null | null | null | null | null | null | null | null | null |
impl<T, A> Serialize for FlatMapEvent<T, A>
where
A: Event<EventType = T>,
{
fn serialize<S>(&self, serializer: S) -> core::result::Result<S::Ok, S::Error>
where
S: Serializer,
{
let mut serialize_map: HashMap<_, _> = self
.0
.iter()
.filter_map(|(k, v... | crates/events/src/lib.rs | events | impl_block | 214 | rust | null | FlatMapEvent | Serialize for | impl Serialize for for FlatMapEvent | null | null | null | null | null | null | null | null |
pub struct PlaidBankAccountCredentialsItem {
pub item_id: String,
pub institution_id: Option<String>,
pub webhook: Option<String>,
pub error: Option<PlaidErrorResponse>,
} | crates/pm_auth/src/connector/plaid/transformers.rs | pm_auth | struct_definition | 42 | rust | PlaidBankAccountCredentialsItem | null | null | null | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/reverse_lookup.rs
Public structs: 2
use diesel::{Identifiable, Insertable, Queryable, Selectable};
use crate::schema::reverse_lookup;
/// This reverse lookup table basically looks up id's and get result_id that you want. This is
/// useful for KV where you can't lookup without key
#[d... | crates/diesel_models/src/reverse_lookup.rs | diesel_models | full_file | 390 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl State for CustomerAssigned {} | crates/router/src/core/payment_methods/tokenize/card_executor.rs | router | impl_block | 6 | rust | null | CustomerAssigned | State for | impl State for for CustomerAssigned | null | null | null | null | null | null | null | null |
pub struct BodyResponse {
submit_single_payment_response: SubmitSinglePaymentResponse,
} | crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | BodyResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/gpayments.rs
Public functions: 1
Public structs: 1
pub mod gpayments_types;
pub mod transformers;
use api_models::webhooks::{IncomingWebhookEvent, ObjectReferenceId};
use common_utils::{
errors::CustomResult,
ext_traits::ByteSliceExt,
request::{Method, ... | crates/hyperswitch_connectors/src/connectors/gpayments.rs | hyperswitch_connectors | full_file | 4,543 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Globalpay {} | crates/hyperswitch_connectors/src/connectors/globalpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Globalpay | api::PaymentToken for | impl api::PaymentToken for for Globalpay | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Getnet {} | crates/hyperswitch_connectors/src/connectors/getnet.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Getnet | api::PaymentVoid for | impl api::PaymentVoid for for Getnet | null | null | null | null | null | null | null | null |
impl Hash for ApiEventMetricsBucketIdentifier {
fn hash<H: Hasher>(&self, state: &mut H) {
self.time_bucket.hash(state);
}
} | crates/api_models/src/analytics/api_event.rs | api_models | impl_block | 36 | rust | null | ApiEventMetricsBucketIdentifier | Hash for | impl Hash for for ApiEventMetricsBucketIdentifier | null | null | null | null | null | null | null | null |
pub struct MonerisPaymentMethodData {
payment_method_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/moneris/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | MonerisPaymentMethodData | null | null | null | null | null | null | null | null | null | null | null |
File: crates/api_models/src/events.rs
pub mod apple_pay_certificates_migration;
pub mod chat;
pub mod connector_onboarding;
pub mod customer;
pub mod dispute;
pub mod external_service_auth;
pub mod gsm;
mod locker_migration;
pub mod payment;
#[cfg(feature = "payouts")]
pub mod payouts;
#[cfg(feature = "recon")]
pub mo... | crates/api_models/src/events.rs | api_models | full_file | 1,514 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/// Get all payment processor tokens with retry information and wait times.
pub fn get_tokens_with_retry_metadata(
state: &SessionState,
payment_processor_token_info_map: &HashMap<String, PaymentProcessorTokenStatus>,
) -> HashMap<String, PaymentProcessorTokenWithRetryInfo> {
let today =... | crates/router/src/types/storage/revenue_recovery_redis_operation.rs | router | function_signature | 388 | rust | null | null | null | null | get_tokens_with_retry_metadata | null | null | null | null | null | null | null |
impl ProfileAcquirer {
pub fn server(state: AppState) -> Scope {
web::scope("/profile_acquirer")
.app_data(web::Data::new(state))
.service(
web::resource("").route(web::post().to(profile_acquirer::create_profile_acquirer)),
)
.service(
... | crates/router/src/routes/app.rs | router | impl_block | 101 | rust | null | ProfileAcquirer | null | impl ProfileAcquirer | null | null | null | null | null | null | null | null |
pub struct RoleName(String); | crates/router/src/types/domain/user.rs | router | struct_definition | 6 | rust | RoleName | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_inner_value(&self) -> Secret<String> {
match self {
Self::Json(i) => serde_json::to_string(&i).unwrap_or_default().into(),
Self::FormUrlEncoded(i) => serde_urlencoded::to_string(i).unwrap_or_default().into(),
Self::Xml(i) => quick_xml::se::to_string(&i).unwrap_or_d... | crates/common_utils/src/request.rs | common_utils | function_signature | 113 | rust | null | null | null | null | get_inner_value | null | null | null | null | null | null | null |
File: crates/external_services/src/file_storage.rs
Public functions: 2
Public structs: 1
//! Module for managing file storage operations with support for multiple storage schemes.
use std::{
fmt::{Display, Formatter},
sync::Arc,
};
use common_utils::errors::CustomResult;
/// Includes functionality for AWS... | crates/external_services/src/file_storage.rs | external_services | full_file | 717 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Datatrans {} | crates/hyperswitch_connectors/src/connectors/datatrans.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Datatrans | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Datatrans | null | null | null | null | null | null | null | null |
pub struct CardVerification {
result_code: Option<String>,
result_code_raw: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | CardVerification | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentLink {
mandate: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs | hyperswitch_connectors | struct_definition | 12 | rust | PaymentLink | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Opayo {} | crates/hyperswitch_connectors/src/connectors/opayo.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Opayo | api::RefundSync for | impl api::RefundSync for for Opayo | null | null | null | null | null | null | null | null |
pub struct PaymentMethod {
payment_card: Card,
} | crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs | hyperswitch_connectors | struct_definition | 12 | rust | PaymentMethod | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/account/{account_id}/business_profile/{profile_id}/dynamic_routing/success_based/config/{algorithm_id}"
{
"patch": {
"tags": [
"Routing"
],
"summary": "Routing - Update success based dynamic routing config for profile",
"description": "Update success based dynamic rou... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 484 | .json | null | null | null | null | null | openapi_spec | paths | [
"/account/{account_id}/business_profile/{profile_id}/dynamic_routing/success_based/config/{algorithm_id}"
] | null | null | null | null |
pub async fn handle_metadata_update(
state: &SessionState,
metadata: &pm_types::NetworkTokenRequestorData,
locker_id: String,
payment_method: &domain::PaymentMethod,
merchant_context: &domain::MerchantContext,
decrypted_data: api::payment_methods::CardDetailFromLocker,
is_pan_update: bool,
)... | crates/router/src/core/webhooks/network_tokenization_incoming.rs | router | function_signature | 1,008 | rust | null | null | null | null | handle_metadata_update | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/routing/evaluate"
{
"post": {
"tags": [
"Routing"
],
"summary": "Routing - Evaluate",
"description": "Evaluate routing rules",
"operationId": "Evaluate routing rules",
"requestBody": {
"content": {
"application/json": {
"schema": {
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 279 | .json | null | null | null | null | null | openapi_spec | paths | [
"/routing/evaluate"
] | null | null | null | null |
pub fn operation<'a>(&self) -> &'a str {
match self {
Self::Insert { .. } => "insert",
Self::Update { .. } => "update",
}
} | crates/diesel_models/src/kv.rs | diesel_models | function_signature | 43 | rust | null | null | null | null | operation | null | null | null | null | null | null | null |
pub struct SuccessRateAccumulator {
pub success: u32,
pub total: u32,
} | crates/analytics/src/refunds/accumulator.rs | analytics | struct_definition | 25 | rust | SuccessRateAccumulator | null | null | null | null | null | null | null | null | null | null | null |
impl behaviour::Conversion for MerchantConnectorAccount {
type DstType = diesel_models::merchant_connector_account::MerchantConnectorAccount;
type NewDstType = diesel_models::merchant_connector_account::MerchantConnectorAccountNew;
async fn convert(self) -> CustomResult<Self::DstType, ValidationError> {
... | crates/hyperswitch_domain_models/src/merchant_connector_account.rs | hyperswitch_domain_models | impl_block | 1,106 | rust | null | MerchantConnectorAccount | behaviour::Conversion for | impl behaviour::Conversion for for MerchantConnectorAccount | null | null | null | null | null | null | null | null |
File: crates/router/src/core/authentication/transformers.rs
Public functions: 4
use std::marker::PhantomData;
use api_models::payments;
use common_enums::PaymentMethod;
use common_utils::ext_traits::ValueExt;
use error_stack::ResultExt;
use crate::{
core::{
errors::{self, RouterResult},
payments... | crates/router/src/core/authentication/transformers.rs | router | full_file | 1,819 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_surcharge_metadata_redis_key(payment_attempt_id: &str) -> String {
format!("surcharge_metadata_{payment_attempt_id}")
} | crates/router/src/core/payments/types.rs | router | function_signature | 31 | rust | null | null | null | null | get_surcharge_metadata_redis_key | null | null | null | null | null | null | null |
pub struct PaysafeErrorResponse {
pub error: Error,
} | crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs | hyperswitch_connectors | struct_definition | 13 | rust | PaysafeErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
/// Panics if secret or encryption management client cannot be initiated
pub async fn new(conf: Settings<SecuredSecret>) -> Self {
#[allow(clippy::expect_used)]
let secret_management_client = conf
.secrets_management
.get_secret_management_client()
.await
... | crates/drainer/src/settings.rs | drainer | function_signature | 163 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
impl ConnectorCommon for Paybox {
fn id(&self) -> &'static str {
"paybox"
}
fn common_get_content_type(&self) -> &'static str {
"application/x-www-form-urlencoded"
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
connectors.paybox.base_url.as_ref()
}
... | crates/hyperswitch_connectors/src/connectors/paybox.rs | hyperswitch_connectors | impl_block | 368 | rust | null | Paybox | ConnectorCommon for | impl ConnectorCommon for for Paybox | null | null | null | null | null | null | null | null |
Documentation: api-reference/v2/business-profile/profile--connector-accounts-list.mdx
# Type: Doc File
---
openapi: get /v2/profiles/{id}/connector-accounts
--- | api-reference/v2/business-profile/profile--connector-accounts-list.mdx | null | doc_file | 41 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub trait PaymentMethodExt {
async fn populate_bin_details_for_payment_method(&self, state: &SessionState) -> Self;
// convert to data format compatible to save in payment method table
fn convert_to_additional_payment_method_data(
&self,
) -> RouterResult<payment_methods::PaymentMethodsData>;
... | crates/router/src/core/payment_methods.rs | router | trait_definition | 99 | rust | null | null | PaymentMethodExt | null | null | null | null | null | null | null | null | null |
impl ActivePaymentsMetricsAccumulator {
#[allow(dead_code)]
pub fn collect(self) -> ActivePaymentsMetricsBucketValue {
ActivePaymentsMetricsBucketValue {
active_payments: self.active_payments.collect(),
}
}
} | crates/analytics/src/active_payments/accumulator.rs | analytics | impl_block | 48 | rust | null | ActivePaymentsMetricsAccumulator | null | impl ActivePaymentsMetricsAccumulator | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/query/blocklist_lookup.rs
Public functions: 3
use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
blocklist_lookup::{BlocklistLookup, BlocklistLookupNew},
schema::blocklist_lookup::dsl,
PgPooledConn, StorageResul... | crates/diesel_models/src/query/blocklist_lookup.rs | diesel_models | full_file | 344 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl MerchantAccountUpdateInternal {
pub fn apply_changeset(self, source: MerchantAccount) -> MerchantAccount {
let Self {
merchant_name,
merchant_details,
publishable_key,
storage_scheme,
metadata,
modified_at,
organization... | crates/diesel_models/src/merchant_account.rs | diesel_models | impl_block | 226 | rust | null | MerchantAccountUpdateInternal | null | impl MerchantAccountUpdateInternal | null | null | null | null | null | null | null | null |
pub async fn transfer_user_key(
state: web::Data<AppState>,
req: HttpRequest,
payload: web::Json<user_api::UserKeyTransferRequest>,
) -> HttpResponse {
let flow = Flow::UserTransferKey;
Box::pin(api::server_wrap(
flow,
state.clone(),
&req,
payload.into_inner(),
... | crates/router/src/routes/user.rs | router | function_signature | 123 | rust | null | null | null | null | transfer_user_key | null | null | null | null | null | null | null |
pub fn add_group_by_clause(&mut self, column: impl ToSql<T>) -> QueryResult<()> {
self.group_by.push(
column
.to_sql(&self.table_engine)
.change_context(QueryBuildingError::SqlSerializeError)
.attach_printable("Error serializing group by field")?,
... | crates/analytics/src/query.rs | analytics | function_signature | 73 | rust | null | null | null | null | add_group_by_clause | null | null | null | null | null | null | null |
pub fn supports_access_token(self, payment_method: PaymentMethod) -> bool {
matches!(
(self, payment_method),
(Self::Airwallex, _)
| (Self::Deutschebank, _)
| (Self::Globalpay, _)
| (Self::Jpmorgan, _)
| (Self::Moneris, _)
... | crates/common_enums/src/connector_enums.rs | common_enums | function_signature | 192 | rust | null | null | null | null | supports_access_token | null | null | null | null | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.