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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Documentation: api-reference/v1/mandates/mandates--customer-mandates-list.mdx
# Type: Doc File
---
openapi: post /customers/{customer_id}/mandates
--- | api-reference/v1/mandates/mandates--customer-mandates-list.mdx | null | doc_file | 42 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Silverflow {} | crates/hyperswitch_connectors/src/connectors/silverflow.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Silverflow | api::RefundExecute for | impl api::RefundExecute for for Silverflow | null | null | null | null | null | null | null | null |
pub struct CaptureInputData {
transaction_id: String,
transaction: CaptureTransactionBody,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | CaptureInputData | null | null | null | null | null | null | null | null | null | null | null |
pub struct KafkaRefundEvent<'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 co... | crates/router/src/services/kafka/refund_event.rs | router | struct_definition | 482 | rust | KafkaRefundEvent | null | null | null | null | null | null | null | null | null | null | null |
impl MandateSetup for Authorizedotnet {} | crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Authorizedotnet | MandateSetup for | impl MandateSetup for for Authorizedotnet | null | null | null | null | null | null | null | null |
pub struct PayoutFlowData {
pub merchant_id: common_utils::id_type::MerchantId,
pub customer_id: Option<common_utils::id_type::CustomerId>,
pub connector_customer: Option<String>,
pub address: PaymentAddress,
pub connector_meta_data: Option<pii::SecretSerdeValue>,
pub connector_wallets_details: ... | crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs | hyperswitch_domain_models | struct_definition | 135 | rust | PayoutFlowData | null | null | null | null | null | null | null | null | null | null | null |
impl Nexixpay {
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/nexixpay.rs | hyperswitch_connectors | impl_block | 35 | rust | null | Nexixpay | null | impl Nexixpay | null | null | null | null | null | null | null | null |
pub struct RuleThreeDsDecisionRule {
pub name: String,
pub connector_selection: ThreeDSDecision,
#[schema(value_type = Vec<IfStatement>)]
pub statements: Vec<ast::IfStatement>,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 47 | rust | RuleThreeDsDecisionRule | null | null | null | null | null | null | null | null | null | null | null |
pub struct NordeaConnectorMetadataObject {
/// Account number of the beneficiary (merchant)
pub destination_account_number: Secret<String>,
/// Account type (example: IBAN, BBAN_SE, BBAN_DK, BBAN_NO, BGNR, PGNR, GIRO_DK, BBAN_OTHER)
pub account_type: String,
/// Name of the beneficiary (merchant)
... | crates/hyperswitch_connectors/src/connectors/nordea/transformers.rs | hyperswitch_connectors | struct_definition | 92 | rust | NordeaConnectorMetadataObject | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payment(
state: SessionState,
req: types::DummyConnectorPaymentRequest,
) -> types::DummyConnectorResponse<types::DummyConnectorPaymentResponse> {
utils::tokio_mock_sleep(
state.conf.dummy_connector.payment_duration,
state.conf.dummy_connector.payment_tolerance,
)
.await... | crates/router/src/routes/dummy_connector/core.rs | router | function_signature | 206 | rust | null | null | null | null | payment | null | null | null | null | null | null | null |
pub struct DummyConnectorUpiCollect {
pub vpa_id: Secret<String, pii::UpiVpaMaskingStrategy>,
} | crates/router/src/routes/dummy_connector/types.rs | router | struct_definition | 28 | rust | DummyConnectorUpiCollect | 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 | 964 | rust | null | MerchantConnectorAccount | behaviour::Conversion for | impl behaviour::Conversion for for MerchantConnectorAccount | null | null | null | null | null | null | null | null |
pub struct FileMetadataResponse {
/// ID of the file created
pub file_id: String,
/// Name of the file
pub file_name: Option<String>,
/// Size of the file
pub file_size: i32,
/// Type of the file
pub file_type: String,
/// File availability
pub available: bool,
} | crates/api_models/src/files.rs | api_models | struct_definition | 78 | rust | FileMetadataResponse | null | null | null | null | null | null | null | null | null | null | null |
impl<'a, K, V> IterMut<'a, K, V> {
fn new(iter: slice::IterMut<'a, V>) -> Self {
Self {
inner: iter.enumerate(),
_marker: PhantomData,
}
}
} | crates/hyperswitch_constraint_graph/src/dense_map.rs | hyperswitch_constraint_graph | impl_block | 57 | rust | null | IterMut | null | impl IterMut | null | null | null | null | null | null | null | null |
File: crates/analytics/src/refunds/distribution/sessionized_distribution/refund_error_message.rs
use api_models::analytics::{
refunds::{RefundDimensions, RefundFilters, RefundMetricsBucketIdentifier},
Granularity, RefundDistributionBody, TimeRange,
};
use common_utils::errors::ReportSwitchExt;
use diesel_model... | crates/analytics/src/refunds/distribution/sessionized_distribution/refund_error_message.rs | analytics | full_file | 1,196 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_vault_response_for_insert_payment_method_data<F>(
router_data: VaultRouterData<F>,
) -> RouterResult<pm_types::AddVaultResponse> {
match router_data.response {
Ok(response) => match response {
types::VaultResponseData::ExternalVaultInsertResponse {
connector_vault_... | crates/router/src/core/payment_methods.rs | router | function_signature | 234 | rust | null | null | null | null | get_vault_response_for_insert_payment_method_data | null | null | null | null | null | null | null |
pub async fn merchant_account_create(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<admin::MerchantAccountCreate>,
) -> HttpResponse {
let flow = Flow::MerchantsAccountCreate;
let payload = json_payload.into_inner();
if let Err(api_error) = payload
.webhook_detail... | crates/router/src/routes/admin.rs | router | function_signature | 220 | rust | null | null | null | null | merchant_account_create | null | null | null | null | null | null | null |
pub struct PaymentsResPaymentInstrument {
#[serde(rename = "type")]
pub payment_instrument_type: String,
pub card_bin: Option<String>,
pub last_four: Option<String>,
pub expiry_date: Option<ExpiryDate>,
pub card_brand: Option<String>,
pub funding_type: Option<String>,
pub category: Optio... | crates/hyperswitch_connectors/src/connectors/worldpay/response.rs | hyperswitch_connectors | struct_definition | 92 | rust | PaymentsResPaymentInstrument | null | null | null | null | null | null | null | null | null | null | null |
pub struct ConnectorResponseData {
/// Stringified connector raw response body
pub raw_connector_response: Option<Secret<String>>,
} | crates/common_types/src/domain.rs | common_types | struct_definition | 27 | rust | ConnectorResponseData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn merchant_account_kv_status(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<common_utils::id_type::MerchantId>,
) -> HttpResponse {
let flow = Flow::ConfigKeyFetch;
let merchant_id = path.into_inner();
api::server_wrap(
flow,
state,
&req,
... | crates/router/src/routes/admin.rs | router | function_signature | 126 | rust | null | null | null | null | merchant_account_kv_status | null | null | null | null | null | null | null |
pub struct CountAccumulator {
pub count: Option<i64>,
} | crates/analytics/src/sdk_events/accumulator.rs | analytics | struct_definition | 17 | rust | CountAccumulator | null | null | null | null | null | null | null | null | null | null | null |
Ok(Self {
amount: Amount {
total: item.amount,
currency: item.router_data.request.currency.to_string(),
},
order: Some(FiservOrderRequest { order_id }),
transaction_details: TransactionDetails {
capture_flag: Some(tr... | crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs#chunk1 | hyperswitch_connectors | chunk | 1,341 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn revoke_mandate(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<String>,
) -> HttpResponse {
let flow = Flow::MandatesRevoke;
let mandate_id = mandates::MandateId {
mandate_id: path.into_inner(),
};
Box::pin(api::server_wrap(
flow,
state,
... | crates/router/src/routes/mandates.rs | router | function_signature | 200 | rust | null | null | null | null | revoke_mandate | null | null | null | null | null | null | null |
pub struct DefaultObject {
shipping_taxed: bool,
rate: f64,
} | crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | DefaultObject | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_interfaces/src/api/disputes_v2.rs
//! Disputes V2 interface
use hyperswitch_domain_models::{
router_data_v2::DisputesFlowData,
router_flow_types::dispute::{Accept, Defend, Dsync, Evidence, Fetch},
router_request_types::{
AcceptDisputeRequestData, DefendDisputeRequestData, D... | crates/hyperswitch_interfaces/src/api/disputes_v2.rs | hyperswitch_interfaces | full_file | 434 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Gpayments {} | crates/hyperswitch_connectors/src/connectors/gpayments.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Gpayments | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Gpayments | null | null | null | null | null | null | null | null |
pub struct ItaubankPaymentsResponse {
status: ItaubankPaymentStatus,
calendario: ItaubankPixExpireTime,
txid: String,
#[serde(rename = "pixCopiaECola")]
pix_qr_value: String,
} | crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs | hyperswitch_connectors | struct_definition | 57 | rust | ItaubankPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_user_theme(
state: SessionState,
user_from_token: UserFromToken,
request: theme_api::CreateUserThemeRequest,
) -> UserResponse<theme_api::GetThemeResponse> {
let email_config = if cfg!(feature = "email") {
request.email_config.ok_or(UserErrors::MissingEmailConfig)?
} else... | crates/router/src/core/user/theme.rs | router | function_signature | 427 | rust | null | null | null | null | create_user_theme | null | null | null | null | null | null | null |
impl MerchantConnectorAccountId {
/// Get a merchant connector account id from String
pub fn wrap(merchant_connector_account_id: String) -> CustomResult<Self, ValidationError> {
Self::try_from(std::borrow::Cow::from(merchant_connector_account_id))
}
} | crates/common_utils/src/id_type/merchant_connector_account.rs | common_utils | impl_block | 57 | rust | null | MerchantConnectorAccountId | null | impl MerchantConnectorAccountId | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Plaid {
//TODO: implement functions when support enabled
} | crates/hyperswitch_connectors/src/connectors/plaid.rs | hyperswitch_connectors | impl_block | 18 | rust | null | Plaid | ConnectorValidation for | impl ConnectorValidation for for Plaid | null | null | null | null | null | null | null | null |
pub struct PaymentMethod {
pub name: GetnetPaymentMethods,
} | crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | PaymentMethod | null | null | null | null | null | null | null | null | null | null | null |
pub struct ConfigNew {
pub key: String,
pub config: String,
} | crates/diesel_models/src/configs.rs | diesel_models | struct_definition | 18 | rust | ConfigNew | null | null | null | null | null | null | null | null | null | null | null |
pub struct Shipping {
pub address: AddressDetails,
pub name: Option<masking::Secret<String>>,
pub carrier: Option<String>,
pub phone: Option<masking::Secret<String>>,
pub tracking_number: Option<masking::Secret<String>>,
} | crates/router/src/compatibility/stripe/payment_intents/types.rs | router | struct_definition | 56 | rust | Shipping | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentMethodUpdate {
/// Card Details
#[schema(example = json!({
"card_number": "4111111145551142",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "John Doe"}))]
pub card: Option<CardDetailUpdate>,
/// This is a 15 minute expiry token which shall be used ... | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 154 | rust | PaymentMethodUpdate | null | null | null | null | null | null | null | null | null | null | null |
pub struct Shipping {
pub address: Option<payments::AddressDetails>,
pub name: Option<String>,
pub carrier: Option<String>,
pub phone: Option<pii::Secret<String>>,
pub tracking_number: Option<pii::Secret<String>>,
} | crates/router/src/compatibility/stripe/setup_intents/types.rs | router | struct_definition | 54 | rust | Shipping | null | null | null | null | null | null | null | null | null | null | null |
pub fn mk_get_card_response(card: GetCardResponse) -> errors::RouterResult<Card> {
Ok(Card {
card_number: card.card.card_number.get_required_value("card_number")?,
name_on_card: card.card.name_on_card,
card_exp_month: card
.card
.card_exp_month
.get_requir... | crates/router/src/core/payment_methods/transformers.rs | router | function_signature | 131 | rust | null | null | null | null | mk_get_card_response | null | null | null | null | null | null | null |
pub struct DynamicRoutingStatsUpdate {
pub amount: common_utils::types::MinorUnit,
pub success_based_routing_connector: String,
pub payment_connector: String,
pub currency: Option<common_enums::Currency>,
pub payment_method: Option<common_enums::PaymentMethod>,
pub capture_method: Option<common_... | crates/diesel_models/src/dynamic_routing_stats.rs | diesel_models | struct_definition | 144 | rust | DynamicRoutingStatsUpdate | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.TransactionType
{
"type": "string",
"enum": [
"payment",
"payout",
"three_ds_authentication"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 42 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"TransactionType"
] | null | null | null | null |
impl api::Payment for Fiuu {} | crates/hyperswitch_connectors/src/connectors/fiuu.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Fiuu | api::Payment for | impl api::Payment for for Fiuu | null | null | null | null | null | null | null | null |
pub struct WebhookSourceVerifyData {
pub merchant_id: common_utils::id_type::MerchantId,
} | crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs | hyperswitch_domain_models | struct_definition | 23 | rust | WebhookSourceVerifyData | null | null | null | null | null | null | null | null | null | null | null |
impl Charges {
pub fn new() -> Self {
Self {
object: "list",
data: vec![],
has_more: false,
total_count: 0,
url: "http://placeholder".to_string(),
}
}
} | crates/router/src/compatibility/stripe/payment_intents/types.rs | router | impl_block | 55 | rust | null | Charges | null | impl Charges | null | null | null | null | null | null | null | null |
pub struct AuthorizedotnetNonZeroMandateResponse {
customer_profile_id: Option<String>,
customer_payment_profile_id_list: Option<Vec<String>>,
pub messages: ResponseMessages,
} | crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs | hyperswitch_connectors | struct_definition | 39 | rust | AuthorizedotnetNonZeroMandateResponse | null | null | null | null | null | null | null | null | null | null | null |
impl Default for SuccessBasedRoutingConfig {
fn default() -> Self {
Self {
params: Some(vec![DynamicRoutingConfigParams::PaymentMethod]),
config: Some(SuccessBasedRoutingConfigBody {
min_aggregates_size: Some(5),
default_success_rate: Some(100.0),
... | crates/api_models/src/routing.rs | api_models | impl_block | 158 | rust | null | SuccessBasedRoutingConfig | Default for | impl Default for for SuccessBasedRoutingConfig | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs
Public structs: 10
use api_models;
use common_enums;
use common_utils::{
events::{ApiEventMetric, ApiEventsType},
pii::Email,
};
use diesel_models::types::OrderDetailsWithAmount;
use masking::Secret;
use serde::{Deserialize, Serial... | crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs | hyperswitch_domain_models | full_file | 1,379 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl common_utils::events::ApiEventMetric for RoutingEvaluateResponse {} | crates/api_models/src/routing.rs | api_models | impl_block | 14 | rust | null | RoutingEvaluateResponse | common_utils::events::ApiEventMetric for | impl common_utils::events::ApiEventMetric for for RoutingEvaluateResponse | null | null | null | null | null | null | null | null |
impl ActivePaymentsMetricsBucketIdentifier {
pub fn new(time_bucket: Option<String>) -> Self {
Self { time_bucket }
}
} | crates/api_models/src/analytics/active_payments.rs | api_models | impl_block | 29 | rust | null | ActivePaymentsMetricsBucketIdentifier | null | impl ActivePaymentsMetricsBucketIdentifier | null | null | null | null | null | null | null | null |
impl api::Payment for Juspaythreedsserver {} | crates/hyperswitch_connectors/src/connectors/juspaythreedsserver.rs | hyperswitch_connectors | impl_block | 13 | rust | null | Juspaythreedsserver | api::Payment for | impl api::Payment for for Juspaythreedsserver | null | null | null | null | null | null | null | null |
impl ValueType {
pub fn get_type(&self) -> DataType {
match self {
Self::Number(_) => DataType::Number,
Self::StrValue(_) => DataType::StrValue,
Self::MetadataVariant(_) => DataType::MetadataValue,
Self::EnumVariant(_) => DataType::EnumVariant,
Sel... | crates/euclid/src/frontend/ast.rs | euclid | impl_block | 105 | rust | null | ValueType | null | impl ValueType | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Elavon {} | crates/hyperswitch_connectors/src/connectors/elavon.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Elavon | api::MandateSetup for | impl api::MandateSetup for for Elavon | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.TransactionDetailsUiConfiguration
{
"type": "object",
"properties": {
"position": {
"type": "integer",
"format": "int32",
"description": "Position of the key-value pair in the UI",
"example": 5,
"nullable": true
},
"is_key_bold": {
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 172 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"TransactionDetailsUiConfiguration"
] | null | null | null | null |
File: crates/external_services/src/lib.rs
Public functions: 2
//! Interactions with external systems.
#![warn(missing_docs, missing_debug_implementations)]
#[cfg(feature = "email")]
pub mod email;
#[cfg(feature = "aws_kms")]
pub mod aws_kms;
pub mod file_storage;
#[cfg(feature = "hashicorp-vault")]
pub mod hashic... | crates/external_services/src/lib.rs | external_services | full_file | 1,012 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct AvsObject {
id: String,
message: String,
processed: bool,
} | crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | AvsObject | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Bitpay {} | crates/hyperswitch_connectors/src/connectors/bitpay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Bitpay | api::RefundExecute for | impl api::RefundExecute for for Bitpay | null | null | null | null | null | null | null | null |
pub struct SantanderViolations {
#[serde(rename = "razao")]
pub reason: Option<String>,
#[serde(rename = "propriedade")]
pub property: Option<String>,
#[serde(rename = "valor")]
pub value: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/santander/transformers.rs | hyperswitch_connectors | struct_definition | 56 | rust | SantanderViolations | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_sankey(
pool: &AnalyticsProvider,
auth: &AuthInfo,
req: TimeRange,
) -> AnalyticsResult<Vec<SankeyRow>> {
match pool {
AnalyticsProvider::Sqlx(_) => Err(AnalyticsError::NotImplemented(
"Sankey not implemented for sqlx",
))?,
AnalyticsProvider::Clickho... | crates/analytics/src/auth_events/core.rs | analytics | function_signature | 157 | rust | null | null | null | null | get_sankey | null | null | null | null | null | null | null |
impl ConnectorCommon for Katapult {
fn id(&self) -> &'static str {
"katapult"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Base
// TODO! Check connector documentation, on which unit they are processing the currency.
// If the connector accept... | crates/hyperswitch_connectors/src/connectors/katapult.rs | hyperswitch_connectors | impl_block | 461 | rust | null | Katapult | ConnectorCommon for | impl ConnectorCommon for for Katapult | null | null | null | null | null | null | null | null |
File: crates/router/src/core/connector_onboarding.rs
Public functions: 3
use api_models::{connector_onboarding as api, enums};
use masking::Secret;
use crate::{
core::errors::{ApiErrorResponse, RouterResponse, RouterResult},
routes::app::ReqState,
services::{authentication as auth, ApplicationResponse},
... | crates/router/src/core/connector_onboarding.rs | router | full_file | 952 | null | null | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/locker-api-reference/key-custodian/provide-key-2.mdx
# Type: Doc File
---
openapi: rust_locker_open_api_spec post /custodian/key2
--- | api-reference/locker-api-reference/key-custodian/provide-key-2.mdx | null | doc_file | 44 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl Refunds {
pub fn server(config: routes::AppState) -> Scope {
web::scope("/refunds")
.app_data(web::Data::new(config))
.service(web::resource("").route(web::post().to(refund_create)))
.service(
web::resource("/sync").route(web::post().to(refund_retriev... | crates/router/src/compatibility/stripe/app.rs | router | impl_block | 123 | rust | null | Refunds | null | impl Refunds | null | null | null | null | null | null | null | null |
File: crates/router/src/types/domain/user.rs
Public functions: 52
Public structs: 20
use std::{
collections::HashSet,
ops::{Deref, Not},
str::FromStr,
sync::LazyLock,
};
use api_models::{
admin as admin_api, organization as api_org, user as user_api, user_role as user_role_api,
};
use common_enu... | crates/router/src/types/domain/user.rs#chunk0 | router | chunk | 8,182 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Capture> {
generics::generic_insert(conn, self).await
} | crates/diesel_models/src/query/capture.rs | diesel_models | function_signature | 34 | rust | null | null | null | null | insert | null | null | null | null | null | null | null |
pub struct SantanderCard {
number: cards::CardNumber,
expiry_month: Secret<String>,
expiry_year: Secret<String>,
cvc: Secret<String>,
complete: bool,
} | crates/hyperswitch_connectors/src/connectors/santander/transformers.rs | hyperswitch_connectors | struct_definition | 41 | rust | SantanderCard | null | null | null | null | null | null | null | null | null | null | null |
pub struct GpaymentsAuthenticationSuccessResponse {
#[serde(rename = "dsReferenceNumber")]
pub ds_reference_number: String,
#[serde(rename = "dsTransID")]
pub ds_trans_id: String,
#[serde(rename = "threeDSServerTransID")]
pub three_ds_server_trans_id: String,
#[serde(rename = "messageVersion... | crates/hyperswitch_connectors/src/connectors/gpayments/gpayments_types.rs | hyperswitch_connectors | struct_definition | 170 | rust | GpaymentsAuthenticationSuccessResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentResponse {
trace_id: Option<String>,
client_reference: Option<String>,
validation_key: Option<String>,
transaction_reference: String,
} | crates/hyperswitch_connectors/src/connectors/mifinity/transformers.rs | hyperswitch_connectors | struct_definition | 33 | rust | PaymentResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_secret(self) -> Secret<String> {
self.0
} | crates/router/src/types/domain/user.rs | router | function_signature | 18 | rust | null | null | null | null | get_secret | null | null | null | null | null | null | null |
File: crates/router/src/routes/dummy_connector/utils.rs
Public functions: 9
use std::fmt::Debug;
use common_utils::ext_traits::AsyncExt;
use error_stack::{report, ResultExt};
use masking::PeekInterface;
use maud::html;
use rand::{distributions::Uniform, prelude::Distribution};
use tokio::time as tokio;
use super::{... | crates/router/src/routes/dummy_connector/utils.rs | router | full_file | 3,492 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Hipay {} | crates/hyperswitch_connectors/src/connectors/hipay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Hipay | api::PaymentToken for | impl api::PaymentToken for for Hipay | null | null | null | null | null | null | null | null |
impl Hash for FrmMetricsBucketIdentifier {
fn hash<H: Hasher>(&self, state: &mut H) {
self.frm_status.hash(state);
self.frm_name.hash(state);
self.frm_transaction_type.hash(state);
self.time_bucket.hash(state);
}
} | crates/api_models/src/analytics/frm.rs | api_models | impl_block | 60 | rust | null | FrmMetricsBucketIdentifier | Hash for | impl Hash for for FrmMetricsBucketIdentifier | null | null | null | null | null | null | null | null |
impl<V: ValueNode> Deref for Memoization<V> {
type Target = FxHashMap<(NodeId, Relation, Strength), Result<(), Arc<AnalysisTrace<V>>>>;
fn deref(&self) -> &Self::Target {
&self.0
}
} | crates/hyperswitch_constraint_graph/src/types.rs | hyperswitch_constraint_graph | impl_block | 59 | rust | null | Memoization | Deref for | impl Deref for for Memoization | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentRetrieveBody
{
"type": "object",
"properties": {
"merchant_id": {
"type": "string",
"description": "The identifier for the Merchant Account.",
"nullable": true
},
"force_sync": {
"type": "boolean",
"description": "Decider to ena... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 262 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentRetrieveBody"
] | null | null | null | null |
pub struct Config {
/// Logging to a file.
pub log: Log,
} | crates/router_env/src/logger/config.rs | router_env | struct_definition | 18 | rust | Config | null | null | null | null | null | null | null | null | null | null | null |
pub trait RelayInterface {
type Request: Validate;
fn validate_relay_request(req: &Self::Request) -> RouterResult<()> {
req.validate()
.change_context(errors::ApiErrorResponse::PreconditionFailed {
message: "Invalid relay request".to_string(),
})
}
fn get... | crates/router/src/core/relay.rs | router | trait_definition | 186 | rust | null | null | RelayInterface | null | null | null | null | null | null | null | null | null |
pub async fn decode_and_decrypt_locker_data(
state: &routes::SessionState,
key_store: &domain::MerchantKeyStore,
enc_card_data: String,
) -> errors::CustomResult<Secret<String>, errors::VaultError> {
let key = key_store.key.get_inner().peek();
let decoded_bytes = hex::decode(&enc_card_data)
... | crates/router/src/core/payment_methods/cards.rs | router | function_signature | 236 | rust | null | null | null | null | decode_and_decrypt_locker_data | null | null | null | null | null | null | null |
pub async fn get_refunds_aggregates(
state: web::Data<AppState>,
req: HttpRequest,
query_params: web::Query<common_utils::types::TimeRange>,
) -> HttpResponse {
let flow = Flow::RefundsAggregate;
let query_params = query_params.into_inner();
Box::pin(api::server_wrap(
flow,
state... | crates/router/src/routes/refunds.rs | router | function_signature | 229 | rust | null | null | null | null | get_refunds_aggregates | null | null | null | null | null | null | null |
File: crates/router/src/services/kafka/authentication_event.rs
Public functions: 1
Public structs: 1
use diesel_models::{authentication::Authentication, enums as storage_enums};
use time::OffsetDateTime;
#[serde_with::skip_serializing_none]
#[derive(serde::Serialize, Debug)]
pub struct KafkaAuthenticationEvent<'a> ... | crates/router/src/services/kafka/authentication_event.rs | router | full_file | 1,123 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct DeleteUserRoleRequest {
pub email: pii::Email,
} | crates/api_models/src/user_role.rs | api_models | struct_definition | 15 | rust | DeleteUserRoleRequest | null | null | null | null | null | null | null | null | null | null | null |
pub fn create_certificate(
encoded_certificate: masking::Secret<String>,
) -> Result<Vec<reqwest::Certificate>, error_stack::Report<HttpClientError>> {
let decoded_certificate = BASE64_ENGINE
.decode(encoded_certificate.expose())
.change_context(HttpClientError::CertificateDecodeFailed)?;
l... | crates/external_services/src/http_client/client.rs | external_services | function_signature | 115 | rust | null | null | null | null | create_certificate | null | null | null | null | null | null | null |
pub struct BarclaycardConsumerAuthInformationValidateRequest {
authentication_transaction_id: String,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | BarclaycardConsumerAuthInformationValidateRequest | null | null | null | null | null | null | null | null | null | null | null |
macro_rules! impl_error_display {
($st: ident, $arg: tt) => {
impl Display for $st {
fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
fmt,
"{{ error_type: {:?}, error_description: {} }}",
... | crates/router/src/core/errors.rs | router | macro | 88 | rust | null | null | null | null | null | null | null | null | declarative | null | null | null |
File: crates/openapi/src/routes/authentication.rs
Public functions: 1
/// Authentication - Create
///
/// Create a new authentication for accessing our APIs from your servers.
///
#[utoipa::path(
post,
path = "/authentication",
request_body = AuthenticationCreateRequest,
responses(
(status = 2... | crates/openapi/src/routes/authentication.rs | openapi | full_file | 131 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::Refund for Phonepe {} | crates/hyperswitch_connectors/src/connectors/phonepe.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Phonepe | api::Refund for | impl api::Refund for for Phonepe | null | null | null | null | null | null | null | null |
pub trait OperationSessionGetters<F> {
fn get_payment_attempt(&self) -> &storage::PaymentAttempt;
#[cfg(feature = "v2")]
fn list_payments_attempts(&self) -> &Vec<storage::PaymentAttempt>;
fn get_payment_intent(&self) -> &storage::PaymentIntent;
#[cfg(feature = "v2")]
fn get_client_secret(&self) ... | crates/router/src/core/payments.rs | router | trait_definition | 882 | rust | null | null | OperationSessionGetters | null | null | null | null | null | null | null | null | null |
pub struct ArchipelErrorMessage {
pub code: String,
pub description: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | ArchipelErrorMessage | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_totp_attempts_from_redis(state: &SessionState, user_id: &str) -> UserResult<u8> {
let redis_conn = super::get_redis_connection_for_global_tenant(state)?;
redis_conn
.get_key::<Option<u8>>(&get_totp_attempts_key(user_id).into())
.await
.change_context(UserErrors::Internal... | crates/router/src/utils/user/two_factor_auth.rs | router | function_signature | 94 | rust | null | null | null | null | get_totp_attempts_from_redis | null | null | null | null | null | null | null |
pub struct RazorpayWebhookPayloadBody {
// pub refund: Option<RazorpayRefundWebhookPayload>,
// pub payment: RazorpayPaymentWebhookPayload,
// } | crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs | hyperswitch_connectors | struct_definition | 38 | rust | RazorpayWebhookPayloadBody | null | null | null | null | null | null | null | null | null | null | null |
pub struct ApplePayRegularBillingDetails {
/// The label that Apple Pay displays to the user in the payment sheet with the recurring details
pub label: String,
/// The date of the first payment
#[serde(with = "common_utils::custom_serde::iso8601::option")]
pub recurring_payment_start_date: Option<ti... | crates/diesel_models/src/types.rs | diesel_models | struct_definition | 195 | rust | ApplePayRegularBillingDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct SupportedPaymentMethodsForMandate(
pub HashMap<enums::PaymentMethod, SupportedPaymentMethodTypesForMandate>,
); | crates/payment_methods/src/configs/settings.rs | payment_methods | struct_definition | 29 | rust | SupportedPaymentMethodsForMandate | null | null | null | null | null | null | null | null | null | null | null |
pub struct UpdateScorePayload {
#[schema(value_type = String)]
pub merchant_id: id_type::ProfileId,
pub gateway: String,
pub status: TxnStatus,
#[schema(value_type = String)]
pub payment_id: id_type::PaymentId,
} | crates/api_models/src/open_router.rs | api_models | struct_definition | 59 | rust | UpdateScorePayload | null | null | null | null | null | null | null | null | null | null | null |
impl SubscriptionUpdate {
pub fn new(payment_method_id: Option<String>, status: Option<String>) -> Self {
Self {
payment_method_id,
status,
modified_at: common_utils::date_time::now(),
}
}
} | crates/diesel_models/src/subscription.rs | diesel_models | impl_block | 51 | rust | null | SubscriptionUpdate | null | impl SubscriptionUpdate | null | null | null | null | null | null | null | null |
pub struct KafkaAuthenticationEvent<'a> {
pub authentication_id: &'a common_utils::id_type::AuthenticationId,
pub merchant_id: &'a common_utils::id_type::MerchantId,
pub authentication_connector: Option<&'a String>,
pub connector_authentication_id: Option<&'a String>,
pub authentication_data: Option... | crates/router/src/services/kafka/authentication_event.rs | router | struct_definition | 528 | rust | KafkaAuthenticationEvent | null | null | null | null | null | null | null | null | null | null | null |
impl api::Payouts for Ebanx {} | crates/hyperswitch_connectors/src/connectors/ebanx.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Ebanx | api::Payouts for | impl api::Payouts for for Ebanx | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Multisafepay {
fn id(&self) -> &'static str {
"multisafepay"
}
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, con... | crates/hyperswitch_connectors/src/connectors/multisafepay.rs | hyperswitch_connectors | impl_block | 396 | rust | null | Multisafepay | ConnectorCommon for | impl ConnectorCommon for for Multisafepay | null | null | null | null | null | null | null | null |
pub async fn pre_payment_tokenization(
state: &SessionState,
customer_id: id_type::CustomerId,
card: &payment_method_data::Card,
) -> RouterResult<(Option<pm_types::TokenResponse>, Option<String>)> {
let network_tokenization_supported_card_networks = &state
.conf
.network_tokenization_su... | crates/router/src/core/payments/tokenization.rs | router | function_signature | 493 | rust | null | null | null | null | pre_payment_tokenization | null | null | null | null | null | null | null |
pub struct RazorpayError {
pub code: String,
pub description: String,
pub source: Option<String>,
pub step: Option<String>,
pub reason: Option<String>,
pub metadata: Option<Metadata>,
} | crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs | hyperswitch_connectors | struct_definition | 48 | rust | RazorpayError | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_inner(&self) -> &T {
&self.inner
} | crates/hyperswitch_interfaces/src/secrets_interface/secret_state.rs | hyperswitch_interfaces | function_signature | 18 | rust | null | null | null | null | get_inner | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::ThreeDsDecisionRuleExecute;
let payload = payload.into_inner();
Box::pin(api::server_wrap(
flow,
state,
&req,
payload,
|state, auth: auth::AuthenticationData, req, _| {
let merchant_context = MerchantContext::NormalMerchan... | crates/router/src/routes/three_ds_decision_rule.rs | router | impl_block | 163 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Shift4 {} | crates/hyperswitch_connectors/src/connectors/shift4.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Shift4 | api::RefundExecute for | impl api::RefundExecute for for Shift4 | null | null | null | null | null | null | null | null |
File: crates/router/src/core/apple_pay_certificates_migration.rs
Public functions: 1
use api_models::apple_pay_certificates_migration;
use common_utils::{errors::CustomResult, type_name, types::keymanager::Identifier};
use error_stack::ResultExt;
use masking::{PeekInterface, Secret};
use super::{
errors::{self, ... | crates/router/src/core/apple_pay_certificates_migration.rs | router | full_file | 851 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &FloatMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/plaid.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct VerifyRecoveryCodeRequest {
pub recovery_code: Secret<String>,
} | crates/api_models/src/user.rs | api_models | struct_definition | 17 | rust | VerifyRecoveryCodeRequest | null | null | null | null | null | null | null | null | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.