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 refund_to_refund_core_workflow_model(
refund: &diesel_refund::Refund,
) -> diesel_refund::RefundCoreWorkflow {
diesel_refund::RefundCoreWorkflow {
refund_id: refund.id.clone(),
connector_transaction_id: refund.connector_transaction_id.clone(),
merchant_id: refund.merchant_id.clone... | crates/router/src/core/refunds_v2.rs | router | function_signature | 95 | rust | null | null | null | null | refund_to_refund_core_workflow_model | null | null | null | null | null | null | null |
pub async fn submit_evidence(
state: SessionState,
merchant_context: domain::MerchantContext,
profile_id: Option<common_utils::id_type::ProfileId>,
req: dispute_models::SubmitEvidenceRequest,
) -> RouterResponse<dispute_models::DisputeResponse> {
todo!()
} | crates/router/src/core/disputes.rs | router | function_signature | 66 | rust | null | null | null | null | submit_evidence | null | null | null | null | null | null | null |
Documentation: api-reference/v1/payouts/payouts--retrieve.mdx
# Type: Doc File
---
openapi: get /payouts/{payout_id}
--- | api-reference/v1/payouts/payouts--retrieve.mdx | null | doc_file | 38 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentsResponse {
status: DummyConnectorPaymentStatus,
id: String,
amount: MinorUnit,
currency: Currency,
created: String,
payment_method_type: PaymentMethodType,
next_action: Option<DummyConnectorNextAction>,
} | crates/hyperswitch_connectors/src/connectors/dummyconnector/transformers.rs | hyperswitch_connectors | struct_definition | 55 | rust | PaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct WellsfargoNotAvailableErrorResponse {
pub errors: Vec<WellsfargoNotAvailableErrorObject>,
} | crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | WellsfargoNotAvailableErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
impl GetPaymentMethodType for BankRedirectData {
fn get_payment_method_type(&self) -> api_enums::PaymentMethodType {
match self {
Self::BancontactCard { .. } => api_enums::PaymentMethodType::BancontactCard,
Self::Bizum {} => api_enums::PaymentMethodType::Bizum,
Self::Blik... | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | impl_block | 487 | rust | null | BankRedirectData | GetPaymentMethodType for | impl GetPaymentMethodType for for BankRedirectData | null | null | null | null | null | null | null | null |
pub struct RedirectUrls {
success_url: String,
failure_url: String,
} | crates/hyperswitch_connectors/src/connectors/iatapay/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | RedirectUrls | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentMethodStatusUpdateWorkflow; | crates/router/src/workflows/payment_method_status_update.rs | router | struct_definition | 8 | rust | PaymentMethodStatusUpdateWorkflow | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CaptureMethod
{
"type": "string",
"description": "Specifies how the payment is captured.\n- `automatic`: Funds are captured immediately after successful authorization. This is the default behavior if the field is omitted.\n- `manual`: Funds are authorized but not captured. A s... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 120 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CaptureMethod"
] | null | null | null | null |
File: crates/diesel_models/src/events.rs
Public structs: 3
use common_utils::{custom_serde, encryption::Encryption};
use diesel::{
expression::AsExpression, AsChangeset, Identifiable, Insertable, Queryable, Selectable,
};
use serde::{Deserialize, Serialize};
use time::PrimitiveDateTime;
use crate::{enums as stor... | crates/diesel_models/src/events.rs | diesel_models | full_file | 946 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Bluesnap {} | crates/hyperswitch_connectors/src/connectors/bluesnap.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Bluesnap | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Bluesnap | null | null | null | null | null | null | null | null |
impl MerchantConnectorAccount {
pub fn get_id(&self) -> id_type::MerchantConnectorAccountId {
self.id.clone()
}
} | crates/diesel_models/src/merchant_connector_account.rs | diesel_models | impl_block | 29 | rust | null | MerchantConnectorAccount | null | impl MerchantConnectorAccount | null | null | null | null | null | null | null | null |
impl IncomingWebhook for Itaubank {
fn get_webhook_object_reference_id(
&self,
_request: &IncomingWebhookRequestDetails<'_>,
) -> CustomResult<ObjectReferenceId, errors::ConnectorError> {
Err(report!(errors::ConnectorError::WebhooksNotImplemented))
}
fn get_webhook_event_type(
... | crates/hyperswitch_connectors/src/connectors/itaubank.rs | hyperswitch_connectors | impl_block | 186 | rust | null | Itaubank | IncomingWebhook for | impl IncomingWebhook for for Itaubank | null | null | null | null | null | null | null | null |
impl api::Refund for Worldpayxml {} | crates/hyperswitch_connectors/src/connectors/worldpayxml.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Worldpayxml | api::Refund for | impl api::Refund for for Worldpayxml | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/flexiti/transformers.rs
Public structs: 13
use common_enums::enums;
use common_utils::{pii::Email, request::Method, types::FloatMajorUnit};
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{AccessToken, ConnectorAuthType, ... | crates/hyperswitch_connectors/src/connectors/flexiti/transformers.rs | hyperswitch_connectors | full_file | 2,911 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn call_create_connector_customer_if_required<F, Req, D>(
state: &SessionState,
customer: &Option<domain::Customer>,
merchant_context: &domain::MerchantContext,
merchant_connector_account: &helpers::MerchantConnectorAccountType,
payment_data: &mut D,
access_token: Option<&AccessToken>,... | crates/router/src/core/payments.rs | router | function_signature | 734 | rust | null | null | null | null | call_create_connector_customer_if_required | null | null | null | null | null | null | null |
pub struct ConnectorParams {
/// base url
pub base_url: String,
/// secondary base url
pub secondary_base_url: Option<String>,
} | crates/hyperswitch_domain_models/src/connector_endpoints.rs | hyperswitch_domain_models | struct_definition | 33 | rust | ConnectorParams | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuthEventFilterValue {
pub dimension: AuthEventDimensions,
pub values: Vec<String>,
} | crates/api_models/src/analytics.rs | api_models | struct_definition | 23 | rust | AuthEventFilterValue | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Checkout {} | crates/hyperswitch_connectors/src/connectors/checkout.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Checkout | api::PaymentSync for | impl api::PaymentSync for for Checkout | null | null | null | null | null | null | null | null |
impl PaymentMethodsEnabled {
/// Get payment_method
#[cfg(feature = "v1")]
pub fn get_payment_method(&self) -> Option<common_enums::PaymentMethod> {
Some(self.payment_method)
}
/// Get payment_method_types
#[cfg(feature = "v1")]
pub fn get_payment_method_type(
&self,
) ->... | crates/api_models/src/admin.rs | api_models | impl_block | 103 | rust | null | PaymentMethodsEnabled | null | impl PaymentMethodsEnabled | null | null | null | null | null | null | null | null |
pub struct Context {
atomic_values: FxHashSet<EuclidValue>,
numeric_values: FxHashMap<EuclidKey, EuclidValue>,
} | crates/euclid/src/backend/vir_interpreter/types.rs | euclid | struct_definition | 33 | rust | Context | null | null | null | null | null | null | null | null | null | null | null |
impl<T: serde::Serialize> ConvertRaw for T {
type Output = T;
fn convert_raw(self) -> Result<Self::Output, errors::KeyManagerClientError> {
Ok(self)
}
} | crates/common_utils/src/keymanager.rs | common_utils | impl_block | 45 | rust | null | T | ConvertRaw for | impl ConvertRaw for for T | null | null | null | null | null | null | null | null |
impl api::RefundSync for Mollie {} | crates/hyperswitch_connectors/src/connectors/mollie.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Mollie | api::RefundSync for | impl api::RefundSync for for Mollie | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.ApplePayPaymentTiming
{
"type": "string",
"enum": [
"immediate",
"recurring"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 40 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ApplePayPaymentTiming"
] | null | null | null | null |
impl MerchantConnectorListResponse {
pub fn to_merchant_connector_info(&self, connector_label: &String) -> MerchantConnectorInfo {
MerchantConnectorInfo {
connector_label: connector_label.to_string(),
merchant_connector_id: self.id.clone(),
}
}
pub fn get_connector_na... | crates/api_models/src/admin.rs | api_models | impl_block | 83 | rust | null | MerchantConnectorListResponse | null | impl MerchantConnectorListResponse | null | null | null | null | null | null | null | null |
impl RefundSync for Riskified {} | crates/hyperswitch_connectors/src/connectors/riskified.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Riskified | RefundSync for | impl RefundSync for for Riskified | null | null | null | null | null | null | null | null |
pub struct CancelInputData {
transaction_id: String,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 13 | rust | CancelInputData | null | null | null | null | null | null | null | null | null | null | null |
pub struct ProphetpaySyncResponse {
success: bool,
pub response_text: String,
#[serde(rename = "transactionID")]
pub transaction_id: String,
} | crates/hyperswitch_connectors/src/connectors/prophetpay/transformers.rs | hyperswitch_connectors | struct_definition | 36 | rust | ProphetpaySyncResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn check_currency(
currency: enums::Currency,
) -> Result<enums::Currency, errors::ConnectorError> {
if currency == enums::Currency::USD {
Ok(currency)
} else {
Err(errors::ConnectorError::NotSupported {
message: format!("currency {currency} is not supported for this merchant... | crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs | hyperswitch_connectors | function_signature | 85 | rust | null | null | null | null | check_currency | null | null | null | null | null | null | null |
pub fn get_individual_surcharge_key_value_pairs(&self) -> Vec<(String, SurchargeDetails)> {
self.surcharge_results
.iter()
.map(|(surcharge_key, surcharge_details)| {
let key = Self::get_surcharge_details_redis_hashset_key(surcharge_key);
(key, surcharge_d... | crates/router/src/core/payments/types.rs | router | function_signature | 84 | rust | null | null | null | null | get_individual_surcharge_key_value_pairs | null | null | null | null | null | null | null |
File: crates/router/src/routes/recovery_webhooks.rs
Public functions: 1
use actix_web::{web, HttpRequest, Responder};
use router_env::{instrument, tracing, Flow};
use super::app::AppState;
use crate::{
core::{
api_locking,
webhooks::{self, types},
},
services::{api, authentication as auth... | crates/router/src/routes/recovery_webhooks.rs | router | full_file | 373 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn upload_file_to_user_theme_storage(
state: SessionState,
theme_id: String,
user_from_token: UserFromToken,
request: theme_api::UploadFileRequest,
) -> UserResponse<()> {
let db_theme = state
.store
.find_theme_by_theme_id(theme_id)
.await
.to_not_found_res... | crates/router/src/core/user/theme.rs | router | function_signature | 214 | rust | null | null | null | null | upload_file_to_user_theme_storage | null | null | null | null | null | null | null |
pub struct KlarnaData {
klarna: KlarnaDetails,
#[serde(rename = "type")]
payment_method_type: AirwallexPaymentType,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 34 | rust | KlarnaData | null | null | null | null | null | null | null | null | null | null | null |
/// Get the merchant_details from MerchantAccount
pub fn get_merchant_details(&self) -> &OptionalEncryptableValue {
&self.merchant_details
} | crates/hyperswitch_domain_models/src/merchant_account.rs | hyperswitch_domain_models | function_signature | 35 | rust | null | null | null | null | get_merchant_details | null | null | null | null | null | null | null |
pub struct UserAuthenticationMethod {
pub id: String,
pub auth_id: String,
pub owner_id: String,
pub owner_type: enums::Owner,
pub auth_type: enums::UserAuthType,
pub private_config: Option<Encryption>,
pub public_config: Option<serde_json::Value>,
pub allow_signup: bool,
pub created... | crates/diesel_models/src/user_authentication_method.rs | diesel_models | struct_definition | 99 | rust | UserAuthenticationMethod | null | null | null | null | null | null | null | null | null | null | null |
pub struct DisputeMetricsBucketIdentifier {
pub dispute_stage: Option<DisputeStage>,
pub connector: Option<String>,
pub currency: Option<Currency>,
#[serde(rename = "time_range")]
pub time_bucket: TimeRange,
#[serde(rename = "time_bucket")]
#[serde(with = "common_utils::custom_serde::iso8601... | crates/api_models/src/analytics/disputes.rs | api_models | struct_definition | 91 | rust | DisputeMetricsBucketIdentifier | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = AnalyticsFlow::GetDisputeFilters;
Box::pin(api::server_wrap(
flow,
state,
&req,
json_payload.into_inner(),
|state, auth: AuthenticationData, req, _| async move {
let org_id = auth.merchant_account.get... | crates/router/src/analytics.rs | router | impl_block | 184 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub async fn upsert_calculate_pcr_task(
billing_connector_account: &domain::MerchantConnectorAccount,
state: &SessionState,
merchant_context: &domain::MerchantContext,
recovery_intent_from_payment_intent: &domain_revenue_recovery::RecoveryPaymentIntent,
business_profile: &domain::Profile,
intent... | crates/router/src/core/revenue_recovery.rs | router | function_signature | 871 | rust | null | null | null | null | upsert_calculate_pcr_task | null | null | null | null | null | null | null |
impl Responder {
let payload = json_payload.into_inner();
let flow = Flow::PmAuthExchangeToken;
let api_auth = auth::ApiKeyAuth::default();
let (auth, _) = match crate::services::authentication::check_client_secret_and_get_auth(
req.headers(),
&payload,
api_auth,
) {
... | crates/router/src/routes/pm_auth.rs | router | impl_block | 222 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/query/gsm.rs
Public functions: 5
use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use error_stack::report;
use crate::{
errors, gsm::*, query::generics, schema::gateway_status_map::dsl, PgPooledConn, StorageResult,
};
impl GatewayStatusMappingNew {
... | crates/diesel_models/src/query/gsm.rs | diesel_models | full_file | 670 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct TrustlyDetails {
shopper_name: Secret<String>,
country_code: enums::CountryAlpha2,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | TrustlyDetails | null | null | null | null | null | null | null | null | null | null | null |
impl ApiEventMetricsBucketIdentifier {
pub fn new(normalized_time_range: TimeRange) -> Self {
Self {
time_bucket: normalized_time_range,
start_time: normalized_time_range.start_time,
}
}
} | crates/api_models/src/analytics/api_event.rs | api_models | impl_block | 48 | rust | null | ApiEventMetricsBucketIdentifier | null | impl ApiEventMetricsBucketIdentifier | null | null | null | null | null | null | null | null |
impl StripeApis {
pub fn server(state: routes::AppState) -> Scope {
let max_depth = 10;
let strict = false;
web::scope("/vs/v1")
.app_data(web::Data::new(serde_qs::Config::new(max_depth, strict)))
.service(app::SetupIntents::server(state.clone()))
.service... | crates/router/src/compatibility/stripe.rs | router | impl_block | 138 | rust | null | StripeApis | null | impl StripeApis | null | null | null | null | null | null | null | null |
pub struct SilverflowRefundRequest {
#[serde(rename = "refundAmount")]
pub refund_amount: MinorUnit,
pub reference: String,
} | crates/hyperswitch_connectors/src/connectors/silverflow/transformers.rs | hyperswitch_connectors | struct_definition | 32 | rust | SilverflowRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
pub fn parse_facilitapay_error_response(
res: Response,
event_builder: Option<&mut ConnectorEvent>,
) -> CustomResult<ErrorResponse, errors::ConnectorError> {
let status_code = res.status_code;
let response_body_bytes = res.response.clone();
let (message, raw_error) =
match response_body_by... | crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs | hyperswitch_connectors | function_signature | 311 | rust | null | null | null | null | parse_facilitapay_error_response | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::DecisionManagerRetrieveConfig;
Box::pin(oss_api::server_wrap(
flow,
state,
&req,
(),
|state, auth: auth::AuthenticationData, _, _| {
let merchant_context = domain::MerchantContext::NormalMerchant(Box::new(
doma... | crates/router/src/routes/routing.rs | router | impl_block | 219 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.MerchantAccountData
{
"oneOf": [
{
"type": "object",
"required": [
"iban"
],
"properties": {
"iban": {
"type": "object",
"description": "IBAN-based account for international transfers",
"required": [
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 1,536 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"MerchantAccountData"
] | null | null | null | null |
impl api::PaymentAuthorize for Rapyd {} | crates/hyperswitch_connectors/src/connectors/rapyd.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Rapyd | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Rapyd | null | null | null | null | null | null | null | null |
pub struct JpmorganCard {
account_number: Secret<String>,
expiry: Expiry,
} | crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | JpmorganCard | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/routing/routing--retrieve-default-for-profile.mdx
# Type: Doc File
---
openapi: get /routing/default/profile
--- | api-reference/v1/routing/routing--retrieve-default-for-profile.mdx | null | doc_file | 35 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn schedule_next_dispute_list_task(
db: &dyn StorageInterface,
tracking_data: &api::DisputeListPTData,
dispute_polling_interval: i32,
) -> Result<(), errors::ProcessTrackerError> {
let new_created_till = tracking_data
.created_till
.checked_add(time::Duration::hours(i64::from(d... | crates/router/src/workflows/dispute_list.rs | router | function_signature | 206 | rust | null | null | null | null | schedule_next_dispute_list_task | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/ebanx.rs
use masking::Secret;
use router::types::{self, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct EbanxTest;
impl ConnectorActions for EbanxTest {}
impl utils::Connector for EbanxTest {
fn get_da... | crates/router/tests/connectors/ebanx.rs | router | full_file | 2,946 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ApiEventMetric for GenerateFingerprintRequest {} | crates/api_models/src/blocklist.rs | api_models | impl_block | 10 | rust | null | GenerateFingerprintRequest | ApiEventMetric for | impl ApiEventMetric for for GenerateFingerprintRequest | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Fiservemea {
fn id(&self) -> &'static str {
"fiservemea"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Base
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connecto... | crates/hyperswitch_connectors/src/connectors/fiservemea.rs | hyperswitch_connectors | impl_block | 582 | rust | null | Fiservemea | ConnectorCommon for | impl ConnectorCommon for for Fiservemea | null | null | null | null | null | null | null | null |
pub struct GetCardResponse {
pub card: AddCardResponse,
} | crates/router/src/core/payment_methods/transformers.rs | router | struct_definition | 15 | rust | GetCardResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayoutQuoteResponse {
pub source_id: Secret<String>,
pub destination_currency_code: Currency,
pub amount: FloatMajorUnit,
pub source_currency_code: Currency,
pub include_fee: bool,
pub fees: Vec<FeesType>,
pub payment_reference: String,
} | crates/hyperswitch_connectors/src/connectors/nomupay/transformers.rs | hyperswitch_connectors | struct_definition | 63 | rust | PayoutQuoteResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct TokenizedCard {
number: cards::CardNumber,
expiration_month: Secret<String>,
expiration_year: Secret<String>,
cryptogram: Option<Secret<String>>,
transaction_type: TransactionType,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 45 | rust | TokenizedCard | null | null | null | null | null | null | null | null | null | null | null |
pub struct NexixpayPaymentsRequest {
order: Order,
#[serde(flatten)]
payment_data: NexixpayPaymentsRequestData,
} | crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs | hyperswitch_connectors | struct_definition | 31 | rust | NexixpayPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
impl IncomingWebhook for Wise {
fn get_webhook_source_verification_algorithm(
&self,
_request: &IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn common_utils::crypto::VerifySignature + Send>, ConnectorError> {
Ok(Box::new(common_utils::crypto::RsaSha256))
}
fn get_we... | crates/hyperswitch_connectors/src/connectors/wise.rs | hyperswitch_connectors | impl_block | 1,006 | rust | null | Wise | IncomingWebhook for | impl IncomingWebhook for for Wise | null | null | null | null | null | null | null | null |
pub async fn get_cache_store(
config: &Settings,
shut_down_signal: oneshot::Sender<() | crates/router/src/services.rs | router | function_signature | 25 | rust | null | null | null | null | get_cache_store | null | null | null | null | null | null | null |
impl PaymentMetricAccumulator for AverageAccumulator {
type MetricOutput = Option<f64>;
fn add_metrics_bucket(&mut self, metrics: &PaymentMetricRow) {
let total = metrics.total.as_ref().and_then(ToPrimitive::to_u32);
let count = metrics.count.and_then(|total| u32::try_from(total).ok());
... | crates/analytics/src/payments/accumulator.rs | analytics | impl_block | 190 | rust | null | AverageAccumulator | PaymentMetricAccumulator for | impl PaymentMetricAccumulator for for AverageAccumulator | null | null | null | null | null | null | null | null |
pub fn set_validate_result(self) -> NetworkTokenizationBuilder<'a, CardRequestValidated> {
NetworkTokenizationBuilder {
state: std::marker::PhantomData,
customer: self.customer,
card: self.card,
card_cvc: self.card_cvc,
network_token: self.network_toke... | crates/router/src/core/payment_methods/tokenize/card_executor.rs | router | function_signature | 126 | rust | null | null | null | null | set_validate_result | null | null | null | null | null | null | null |
pub struct FluidData {
value: Secret<String>,
#[serde(skip_serializing_if = "Option::is_none")]
descriptor: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 32 | rust | FluidData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_profile_acquirer(
state: SessionState,
request: profile_acquirer::ProfileAcquirerCreate,
merchant_context: domain::MerchantContext,
) -> RouterResponse<profile_acquirer::ProfileAcquirerResponse> {
let db = state.store.as_ref();
let profile_acquirer_id = common_utils::generate_pro... | crates/router/src/core/profile_acquirer.rs | router | function_signature | 719 | rust | null | null | null | null | create_profile_acquirer | null | null | null | null | null | null | null |
File: crates/analytics/src/api_event/metrics/api_count.rs
use std::collections::HashSet;
use api_models::analytics::{
api_event::{ApiEventDimensions, ApiEventFilters, ApiEventMetricsBucketIdentifier},
Granularity, TimeRange,
};
use common_utils::errors::ReportSwitchExt;
use error_stack::ResultExt;
use time::P... | crates/analytics/src/api_event/metrics/api_count.rs | analytics | full_file | 789 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Shift4 {} | crates/hyperswitch_connectors/src/connectors/shift4.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Shift4 | api::PaymentVoid for | impl api::PaymentVoid for for Shift4 | null | null | null | null | null | null | null | null |
File: crates/router/src/types/storage/business_profile.rs
pub use diesel_models::business_profile::{Profile, ProfileNew, ProfileUpdateInternal};
| crates/router/src/types/storage/business_profile.rs | router | full_file | 28 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl Cryptopay {
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/cryptopay.rs | hyperswitch_connectors | impl_block | 35 | rust | null | Cryptopay | null | impl Cryptopay | null | null | null | null | null | null | null | null |
impl api::Refund for Trustpayments {} | crates/hyperswitch_connectors/src/connectors/trustpayments.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Trustpayments | api::Refund for | impl api::Refund for for Trustpayments | null | null | null | null | null | null | null | null |
pub(crate) fn api_error_derive_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
let name = &ast.ident;
let (impl_generics, ty_generics, where_clause) = ast.generics.split_for_impl();
let variants = match &ast.data {
Data::Enum(e) => &e.variants,
_ => return Err(non_enum_error()),
... | crates/router_derive/src/macros/api_error.rs | router_derive | function_signature | 324 | rust | null | null | null | null | api_error_derive_inner | null | null | null | null | null | null | null |
pub struct Aci {
amount_converter: &'static (dyn AmountConvertor<Output = StringMajorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/aci.rs | hyperswitch_connectors | struct_definition | 27 | rust | Aci | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.VoucherResponse
{
"allOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/VoucherData"
}
],
"nullable": true
},
{
"type": "object"
}
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 68 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"VoucherResponse"
] | null | null | null | null |
impl api::PaymentVoid for HyperswitchVault {} | crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs | hyperswitch_connectors | impl_block | 11 | rust | null | HyperswitchVault | api::PaymentVoid for | impl api::PaymentVoid for for HyperswitchVault | null | null | null | null | null | null | null | null |
pub struct NetworkResponse {
address_verification_result: Option<Secret<String>>,
address_verification_result_code: Option<Secret<String>>,
card_verification_result_code: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs | hyperswitch_connectors | struct_definition | 38 | rust | NetworkResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct ProphetpayVoidResponse {
pub success: bool,
pub response_text: String,
#[serde(rename = "transactionID")]
pub transaction_id: String,
} | crates/hyperswitch_connectors/src/connectors/prophetpay/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | ProphetpayVoidResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct ApplePayMethodData {
apple_pay_payment_token: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | ApplePayMethodData | null | null | null | null | null | null | null | null | null | null | null |
pub struct SilverflowRouterData<T> {
pub amount: MinorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/silverflow/transformers.rs | hyperswitch_connectors | struct_definition | 49 | rust | SilverflowRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub struct CoingateWebhookBody {
pub token: Secret<String>,
pub status: CoingatePaymentStatus,
pub id: i64,
} | crates/hyperswitch_connectors/src/connectors/coingate/transformers.rs | hyperswitch_connectors | struct_definition | 35 | rust | CoingateWebhookBody | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Nexixpay {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&*NEXIXPAY_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*NEXIXPAY_SUPPORTED_PAYMENT_METHODS)
}
fn get_... | crates/hyperswitch_connectors/src/connectors/nexixpay.rs | hyperswitch_connectors | impl_block | 114 | rust | null | Nexixpay | ConnectorSpecifications for | impl ConnectorSpecifications for for Nexixpay | null | null | null | null | null | null | null | null |
impl PaymentSession for Riskified {} | crates/hyperswitch_connectors/src/connectors/riskified.rs | hyperswitch_connectors | impl_block | 7 | rust | null | Riskified | PaymentSession for | impl PaymentSession for for Riskified | null | null | null | null | null | null | null | null |
#[cfg(all(feature = "v1", feature = "dynamic_routing"))]
pub async fn contract_based_dynamic_routing_setup(
state: SessionState,
merchant_context: domain::MerchantContext,
profile_id: common_utils::id_type::ProfileId,
feature_to_enable: routing_types::DynamicRoutingFeatures,
config: Option<routing_t... | crates/router/src/core/routing.rs#chunk2 | router | chunk | 5,248 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl crate::events::ApiEventMetric for GlobalPaymentMethodSessionId {
fn get_api_event_type(&self) -> Option<crate::events::ApiEventsType> {
Some(crate::events::ApiEventsType::PaymentMethodSession {
payment_method_session_id: self.clone(),
})
}
} | crates/common_utils/src/id_type/global_id/payment_methods.rs | common_utils | impl_block | 64 | rust | null | GlobalPaymentMethodSessionId | crate::events::ApiEventMetric for | impl crate::events::ApiEventMetric for for GlobalPaymentMethodSessionId | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/profile_acquirers/{profile_id}/{profile_acquirer_id}"
{
"post": {
"tags": [
"Profile Acquirer"
],
"summary": "Profile Acquirer - Update",
"description": "Update a Profile Acquirer for accessing our APIs from your servers.",
"operationId": "Update a Profile Acquire... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 344 | .json | null | null | null | null | null | openapi_spec | paths | [
"/profile_acquirers/{profile_id}/{profile_acquirer_id}"
] | null | null | null | null |
File: crates/analytics/src/payment_intents/sankey.rs
Public functions: 1
Public structs: 1
use common_enums::enums;
use common_utils::{
errors::ParsingError,
types::{authentication::AuthInfo, TimeRange},
};
use error_stack::ResultExt;
use router_env::logger;
use crate::{
clickhouse::ClickhouseClient,
... | crates/analytics/src/payment_intents/sankey.rs | analytics | full_file | 998 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn decide_frm_flow(
router_data: &mut FrmTransactionRouterData,
state: &SessionState,
connector: &frm_api::FraudCheckConnectorData,
call_connector_action: payments::CallConnectorAction,
_merchant_context: &domain::MerchantContext,
) -> RouterResult<FrmTransactionRouterData> {
let conne... | crates/router/src/core/fraud_check/flows/transaction_flow.rs | router | function_signature | 165 | rust | null | null | null | null | decide_frm_flow | null | null | null | null | null | null | null |
pub fn mk_get_card_request(
locker: &settings::Locker,
locker_id: &'static str,
card_id: &'static str,
) -> CustomResult<services::Request, errors::VaultError> {
let get_card_req = GetCard {
merchant_id: locker_id,
card_id,
};
let mut url = locker.host.to_owned();
url.push_s... | crates/router/src/core/payment_methods/transformers.rs | router | function_signature | 129 | rust | null | null | null | null | mk_get_card_request | null | null | null | null | null | null | null |
impl scheduler::SchedulerSessionState for SessionState {
fn get_db(&self) -> Box<dyn SchedulerInterface> {
self.store.get_scheduler_db()
}
} | crates/router/src/routes/app.rs | router | impl_block | 34 | rust | null | SessionState | scheduler::SchedulerSessionState for | impl scheduler::SchedulerSessionState for for SessionState | null | null | null | null | null | null | null | null |
pub struct BluesnapErrorResponse {
pub message: Vec<ErrorDetails>,
} | crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | BluesnapErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn profile_update() {} | crates/openapi/src/routes/profile.rs | openapi | function_signature | 7 | rust | null | null | null | null | profile_update | null | null | null | null | null | null | null |
pub struct SdkEventsResult {
pub merchant_id: common_utils::id_type::MerchantId,
pub payment_id: common_utils::id_type::PaymentId,
pub event_name: Option<String>,
pub log_type: Option<String>,
pub first_event: bool,
pub browser_name: Option<String>,
pub browser_version: Option<String>,
p... | crates/analytics/src/sdk_events/events.rs | analytics | struct_definition | 198 | rust | SdkEventsResult | null | null | null | null | null | null | null | null | null | null | null |
pub struct ItaubankDebtor {
#[serde(skip_serializing_if = "Option::is_none")]
cpf: Option<Secret<String>>, // CPF is a Brazilian tax identification number
#[serde(skip_serializing_if = "Option::is_none")]
cnpj: Option<Secret<String>>, // CNPJ is a Brazilian company tax identification number
#[serde(... | crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs | hyperswitch_connectors | struct_definition | 103 | rust | ItaubankDebtor | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/metrics.rs
//! Metrics interface
use router_env::{counter_metric, global_meter};
global_meter!(GLOBAL_METER, "ROUTER_API");
counter_metric!(CONNECTOR_RESPONSE_DESERIALIZATION_FAILURE, GLOBAL_METER);
| crates/hyperswitch_connectors/src/metrics.rs | hyperswitch_connectors | full_file | 56 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::Payment for Klarna {} | crates/hyperswitch_connectors/src/connectors/klarna.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Klarna | api::Payment for | impl api::Payment for for Klarna | null | null | null | null | null | null | null | null |
pub struct BackendInput {
pub metadata: Option<FxHashMap<String, String>>,
pub payment: PaymentInput,
pub payment_method: PaymentMethodInput,
pub acquirer_data: Option<AcquirerDataInput>,
pub customer_device_data: Option<CustomerDeviceDataInput>,
pub issuer_data: Option<IssuerDataInput>,
pub... | crates/euclid/src/backend/inputs.rs | euclid | struct_definition | 79 | rust | BackendInput | null | null | null | null | null | null | null | null | null | null | null |
impl Payouts {
pub fn server(state: AppState) -> Scope {
let mut route = web::scope("/payouts").app_data(web::Data::new(state));
route = route.service(web::resource("/create").route(web::post().to(payouts_create)));
#[cfg(feature = "olap")]
{
route = route
... | crates/router/src/routes/app.rs | router | impl_block | 352 | rust | null | Payouts | null | impl Payouts | null | null | null | null | null | null | null | null |
pub struct DeutschebankMandatePostResponse {
rc: String,
message: String,
mandate_id: Option<String>,
reference: Option<String>,
approval_date: Option<String>,
language: Option<String>,
approval_by: Option<DeutschebankSEPAApproval>,
state: Option<DeutschebankSEPAMandateStatus>,
} | crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs | hyperswitch_connectors | struct_definition | 74 | rust | DeutschebankMandatePostResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct TransactionSearchInput {
id: IdFilter,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 13 | rust | TransactionSearchInput | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_recovery_grpc_headers(&self) -> GrpcRecoveryHeaders {
GrpcRecoveryHeaders {
request_id: self.request_id.map(|req_id| (*req_id).to_string()),
}
} | crates/router/src/routes/app.rs | router | function_signature | 47 | rust | null | null | null | null | get_recovery_grpc_headers | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.ApplepaySessionTokenResponse
{
"type": "object",
"required": [
"connector",
"delayed_session_token",
"sdk_next_action"
],
"properties": {
"session_token_data": {
"allOf": [
{
"$ref": "#/components/schemas/ApplePaySessionResponse"
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 324 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ApplepaySessionTokenResponse"
] | null | null | null | null |
impl PaymentLinkInterface for KafkaStore {
async fn find_payment_link_by_payment_link_id(
&self,
payment_link_id: &str,
) -> CustomResult<storage::PaymentLink, errors::StorageError> {
self.diesel_store
.find_payment_link_by_payment_link_id(payment_link_id)
.await
... | crates/router/src/db/kafka_store.rs | router | impl_block | 222 | rust | null | KafkaStore | PaymentLinkInterface for | impl PaymentLinkInterface for for KafkaStore | 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.