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 update(&mut self, new: Self) {
if let Some(params) = new.params {
self.params = Some(params)
}
if let Some(new_config) = new.elimination_analyser_config {
self.elimination_analyser_config
.as_mut()
.map(|config| config.update(new_con... | crates/api_models/src/routing.rs | api_models | function_signature | 117 | rust | null | null | null | null | update | null | null | null | null | null | null | null |
impl HealthCheckInterface for Store {
async fn health_check_db(&self) -> CustomResult<(), HealthCheckDBError> {
let conn = pg_connection(&self.master_pool).await;
conn
.transaction_async(|conn| {
Box::pin(async move {
let query =
... | crates/drainer/src/health_check.rs | drainer | impl_block | 784 | rust | null | Store | HealthCheckInterface for | impl HealthCheckInterface for for Store | null | null | null | null | null | null | null | null |
pub struct DomainConnectionConfig {
/// Base URL of the connector endpoint
pub base_url: String,
/// Path to append to the base URL for the specific endpoint
pub endpoint_path: String,
/// HTTP method to use for the request
pub http_method: HttpMethod,
/// HTTP he... | crates/injector/src/types.rs | injector | struct_definition | 276 | rust | DomainConnectionConfig | null | null | null | null | null | null | null | null | null | null | null |
pub struct NetworkTokenMetaDataUpdateBody {
pub token: NetworkTokenRequestorData,
} | crates/router/src/types/payment_methods.rs | router | struct_definition | 19 | rust | NetworkTokenMetaDataUpdateBody | null | null | null | null | null | null | null | null | null | null | null |
Web Documentation: Deploy on GCP Using Helm Charts | Hyperswitch
# Type: Web Doc
Note:
This tutorial deploys the full Hyperswitch stack, launching multiple services that may exceed compute limits on smaller clusters.
Part 1: Setting Up a Kubernetes Cluster on GCP
Step 1: Set Up GCP Account and Enable Kubernetes Engine... | https://docs.hyperswitch.io/hyperswitch-open-source/deploy-on-kubernetes-using-helm/deploy-on-gcp-using-helm-charts | null | web_doc_file | 1,462 | doc | null | null | null | null | null | web | null | null | null | https://docs.hyperswitch.io/hyperswitch-open-source/deploy-on-kubernetes-using-helm/deploy-on-gcp-using-helm-charts | Deploy on GCP Using Helm Charts | Hyperswitch | null |
pub struct CardInfo {
pub card_iin: String,
pub card_issuer: Option<String>,
pub card_network: Option<storage_enums::CardNetwork>,
pub card_type: Option<String>,
pub card_subtype: Option<String>,
pub card_issuing_country: Option<String>,
pub bank_code_id: Option<String>,
pub bank_code: O... | crates/diesel_models/src/cards_info.rs | diesel_models | struct_definition | 116 | rust | CardInfo | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payments_cancel(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<payment_types::PaymentsCancelRequest>,
path: web::Path<common_utils::id_type::PaymentId>,
) -> impl Responder {
let flow = Flow::PaymentsCancel;
let mut payload = json_payload.into... | crates/router/src/routes/payments.rs | router | function_signature | 336 | rust | null | null | null | null | payments_cancel | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/boku.rs
use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct BokuTest;
impl ConnectorActions for BokuTest {}
impl utils::Connector for BokuTest {
fn ge... | crates/router/tests/connectors/boku.rs | router | full_file | 2,924 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct HipayPaymentsRequest {
operation: Operation,
authentication_indicator: u8,
cardtoken: Secret<String>,
orderid: String,
currency: enums::Currency,
payment_product: String,
amount: StringMajorUnit,
description: String,
decline_url: Option<String>,
pending_url: Option<Str... | crates/hyperswitch_connectors/src/connectors/hipay/transformers.rs | hyperswitch_connectors | struct_definition | 125 | rust | HipayPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Cryptopay {} | crates/hyperswitch_connectors/src/connectors/cryptopay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Cryptopay | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Cryptopay | null | null | null | null | null | null | null | null |
pub async fn update(
self,
conn: &PgPooledConn,
payment_intent_update: payment_intent::PaymentIntentUpdateInternal,
) -> StorageResult<Self> {
match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>(
conn,
self.id.to_owned(),
pay... | crates/diesel_models/src/query/payment_intent.rs | diesel_models | function_signature | 127 | rust | null | null | null | null | update | null | null | null | null | null | null | null |
pub async fn verify_hypersense_token(
state: web::Data<AppState>,
http_req: HttpRequest,
json_payload: web::Json<external_service_auth_api::ExternalVerifyTokenRequest>,
) -> HttpResponse {
let flow = Flow::HypersenseVerifyToken;
Box::pin(api::server_wrap(
flow,
state.clone(),
... | crates/router/src/routes/hypersense.rs | router | function_signature | 154 | rust | null | null | null | null | verify_hypersense_token | null | null | null | null | null | null | null |
pub struct StripeCard {
pub number: cards::CardNumber,
pub exp_month: pii::Secret<String>,
pub exp_year: pii::Secret<String>,
pub cvc: pii::Secret<String>,
} | crates/router/src/compatibility/stripe/setup_intents/types.rs | router | struct_definition | 45 | rust | StripeCard | null | null | null | null | null | null | null | null | null | null | null |
pub async fn mock_delete_card<'a>(
db: &dyn db::StorageInterface,
card_id: &'a str,
) -> errors::CustomResult<payment_methods::DeleteCardResponse, errors::VaultError> {
let locker_mock_up = db
.delete_locker_mock_up(card_id)
.await
.change_context(errors::VaultError::FetchCardFailed)... | crates/router/src/core/payment_methods/cards.rs | router | function_signature | 134 | rust | null | null | null | null | mock_delete_card | null | null | null | null | null | null | null |
pub trait GetKeymanagerTenant {
fn get_tenant_id(&self, state: &KeyManagerState) -> id_type::TenantId;
} | crates/common_utils/src/types/keymanager.rs | common_utils | trait_definition | 31 | rust | null | null | GetKeymanagerTenant | null | null | null | null | null | null | null | null | null |
pub struct RefundResponseData {
refund: SingleRefundResponseData,
} | crates/hyperswitch_connectors/src/connectors/boku/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | RefundResponseData | null | null | null | null | null | null | null | null | null | null | null |
pub struct ConnectorPayload {
/// Template string containing token references in the format {{$field_name}}
pub template: String,
} | crates/injector/src/types.rs | injector | struct_definition | 27 | rust | ConnectorPayload | null | null | null | null | null | null | null | null | null | null | null |
connectors::Fiuu,
connectors::Flexiti,
connectors::Forte,
connectors::Getnet,
connectors::Globalpay,
connectors::Globepay,
connectors::Gocardless,
connectors::Gpayments,
connectors::Hipay,
connectors::Helcim,
connectors::HyperswitchVault,
connectors::Hyperwallet,
conn... | crates/hyperswitch_connectors/src/default_implementations.rs#chunk2 | hyperswitch_connectors | chunk | 8,186 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn new(routable_connector_choice: RoutableConnectorChoice, bucket_name: String) -> Self {
Self {
routable_connector_choice,
bucket_name,
}
} | crates/api_models/src/routing.rs | api_models | function_signature | 39 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
Web Documentation: Activate Connector on Hyperswitch | Hyperswitch
# Type: Web Doc
Steps to activate connector on the Hyperswitch Control Center
Access connectors section
Navigate to the
Connectors
section on the Control Center.
Select the desired connector using the '+ Connect' button.
Profile details
Profile id will... | https://docs.hyperswitch.io/explore-hyperswitch/connectors/activate-connector-on-hyperswitch | null | web_doc_file | 357 | doc | null | null | null | null | null | web | null | null | null | https://docs.hyperswitch.io/explore-hyperswitch/connectors/activate-connector-on-hyperswitch | Activate Connector on Hyperswitch | Hyperswitch | null |
File: crates/router/tests/payments2.rs
#![allow(
clippy::expect_used,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::print_stdout,
unused_imports
)]
mod utils;
use std::{borrow::Cow, sync::Arc};
use common_utils::{id_type, types::MinorUnit};
use router::{
core::payments,
db::Stor... | crates/router/tests/payments2.rs | router | full_file | 4,203 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn generate_merchant_refund_report(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<ReportRequest>,
) -> impl Responder {
let flow = AnalyticsFlow::GenerateRefundReport;
Box::pin(api::server_wrap(
flow,
state.... | crates/router/src/analytics.rs | router | function_signature | 368 | rust | null | null | null | null | generate_merchant_refund_report | null | null | null | null | null | null | null |
pub struct NetworkTokenRequestorData {
pub card_reference: String,
pub customer_id: String,
pub expiry_year: Secret<String>,
pub expiry_month: Secret<String>,
} | crates/router/src/types/payment_methods.rs | router | struct_definition | 39 | rust | NetworkTokenRequestorData | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Nexixpay {
fn id(&self) -> &'static str {
"nexixpay"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Minor
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connectors:... | crates/hyperswitch_connectors/src/connectors/nexixpay.rs | hyperswitch_connectors | impl_block | 702 | rust | null | Nexixpay | ConnectorCommon for | impl ConnectorCommon for for Nexixpay | null | null | null | null | null | null | null | null |
pub async fn generic_roles_list_for_org(
conn: &PgPooledConn,
tenant_id: id_type::TenantId,
org_id: id_type::OrganizationId,
merchant_id: Option<id_type::MerchantId>,
entity_type: Option<EntityType>,
limit: Option<u32>,
) -> StorageResult<Vec<Self>> {
let mut ... | crates/diesel_models/src/query/role.rs | diesel_models | function_signature | 352 | rust | null | null | null | null | generic_roles_list_for_org | null | null | null | null | null | null | null |
pub async fn switch_org_for_user(
state: web::Data<AppState>,
http_req: HttpRequest,
json_payload: web::Json<user_api::SwitchOrganizationRequest>,
) -> HttpResponse {
let flow = Flow::SwitchOrg;
Box::pin(api::server_wrap(
flow,
state.clone(),
&http_req,
json_payload.i... | crates/router/src/routes/user.rs | router | function_signature | 128 | rust | null | null | null | null | switch_org_for_user | null | null | null | null | null | null | null |
/// Wrap bytes in `SecretBytesMut`
pub fn new(bytes: impl Into<BytesMut>) -> Self {
Self(bytes.into())
} | crates/masking/src/bytes.rs | masking | function_signature | 31 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct WeChatPayInfo {} | crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs | hyperswitch_connectors | struct_definition | 7 | rust | WeChatPayInfo | null | null | null | null | null | null | null | null | null | null | null |
pub async fn switch_org_for_user(
state: SessionState,
request: user_api::SwitchOrganizationRequest,
user_from_token: auth::UserFromToken,
) -> UserResponse<user_api::TokenResponse> {
if user_from_token.org_id == request.org_id {
return Err(UserErrors::InvalidRoleOperationWithMessage(
... | crates/router/src/core/user.rs | router | function_signature | 1,041 | rust | null | null | null | null | switch_org_for_user | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/account/{account_id}/business_profile/{profile_id}/dynamic_routing/contracts/toggle"
{
"post": {
"tags": [
"Routing"
],
"summary": "Routing - Toggle Contract routing for profile",
"description": "Create a Contract based dynamic routing algorithm",
"operationId": "... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 477 | .json | null | null | null | null | null | openapi_spec | paths | [
"/account/{account_id}/business_profile/{profile_id}/dynamic_routing/contracts/toggle"
] | null | null | null | null |
pub struct AciPaymentWebhookPayload {
pub id: String,
pub payment_type: String,
pub payment_brand: String,
pub amount: StringMajorUnit,
pub currency: String,
pub presentation_amount: Option<StringMajorUnit>,
pub presentation_currency: Option<String>,
pub descriptor: Option<String>,
p... | crates/hyperswitch_connectors/src/connectors/aci/transformers.rs | hyperswitch_connectors | struct_definition | 215 | rust | AciPaymentWebhookPayload | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
use crate::db::domain::merchant_context;
let flow = Flow::PaymentMethodsList;
let payload = query_payload.into_inner();
let global_payment_id = path.into_inner();
tracing::Span::current().record("payment_id", global_payment_id.get_string_repr());
let internal_payload = intern... | crates/router/src/routes/payments.rs | router | impl_block | 286 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Adyenplatform {} | crates/hyperswitch_connectors/src/connectors/adyenplatform.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Adyenplatform | api::RefundExecute for | impl api::RefundExecute for for Adyenplatform | null | null | null | null | null | null | null | null |
pub struct CashtocodePaymentsRequest {
amount: FloatMajorUnit,
transaction_id: String,
user_id: Secret<id_type::CustomerId>,
currency: enums::Currency,
first_name: Option<Secret<String>>,
last_name: Option<Secret<String>>,
user_alias: Secret<id_type::CustomerId>,
requested_url: String,
... | crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rs | hyperswitch_connectors | struct_definition | 94 | rust | CashtocodePaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
pub fn permanent_card(
payment_method_id: Option<String>,
locker_id: Option<String>,
token: String,
network_token_locker_id: Option<String>,
) -> Self {
Self::PermanentCard(CardTokenData {
payment_method_id,
locker_id,
token,
ne... | crates/router/src/types/storage/payment_method.rs | router | function_signature | 72 | rust | null | null | null | null | permanent_card | null | null | null | null | null | null | null |
impl EmailData for ResetPassword {
async fn get_email_data(&self, base_url: &str) -> CustomResult<EmailContents, EmailError> {
let token = EmailToken::new_token(
self.recipient_email.clone(),
None,
domain::Origin::ResetPassword,
&self.settings,
)
... | crates/router/src/services/email/types.rs | router | impl_block | 281 | rust | null | ResetPassword | EmailData for | impl EmailData for for ResetPassword | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.OutgoingWebhookResponseContent
{
"type": "object",
"description": "The response information (headers, body and status code) received for the webhook sent.",
"properties": {
"body": {
"type": "string",
"description": "The response body received for the webhook... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 318 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"OutgoingWebhookResponseContent"
] | null | null | null | null |
pub struct Przelewy24MethodData {
billing_email: Option<Email>,
} | crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | Przelewy24MethodData | null | null | null | null | null | null | null | null | null | null | null |
impl AddressDetails {
pub fn get_optional_full_name(&self) -> Option<Secret<String>> {
match (self.first_name.as_ref(), self.last_name.as_ref()) {
(Some(first_name), Some(last_name)) => Some(Secret::new(format!(
"{} {}",
first_name.peek(),
last_nam... | crates/hyperswitch_domain_models/src/address.rs | hyperswitch_domain_models | impl_block | 354 | rust | null | AddressDetails | null | impl AddressDetails | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/silverflow.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use base64::Engine;
use common_enums::{enums, CardNetwork};
use common_utils::{
crypto,
errors::CustomResult,
ext_traits::{BytesExt, StringExt},
requ... | crates/hyperswitch_connectors/src/connectors/silverflow.rs | hyperswitch_connectors | full_file | 7,593 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn proxy_for_call_connector_service<F, RouterDReq, ApiRequest, D>(
state: &SessionState,
req_state: ReqState,
merchant_context: &domain::MerchantContext,
connector: api::ConnectorData,
operation: &BoxedOperation<'_, F, ApiRequest, D>,
payment_data: &mut D,
call_connector_action: Ca... | crates/router/src/core/payments.rs | router | function_signature | 774 | rust | null | null | null | null | proxy_for_call_connector_service | null | null | null | null | null | null | null |
pub struct CybersourceZeroMandateRequest {
processing_information: ProcessingInformation,
payment_information: PaymentInformation,
order_information: OrderInformationWithBill,
client_reference_information: ClientReferenceInformation,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 44 | rust | CybersourceZeroMandateRequest | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let json_payload = json_payload.into_inner();
let flow = Flow::RoutingEvaluateRule;
Box::pin(oss_api::server_wrap(
flow,
state,
&req,
json_payload.clone(),
|state, _auth: auth::AuthenticationData, payload, _| async move {
let euclid_respon... | crates/router/src/routes/routing.rs | router | impl_block | 220 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl RecoveryDeciderClientInterface for DeciderClient<Client> {
async fn decide_on_retry(
&mut self,
request_payload: DeciderRequest,
recovery_headers: super::GrpcRecoveryHeaders,
) -> RecoveryDeciderResult<DeciderResponse> {
let request =
super::create_revenue_recove... | crates/external_services/src/grpc_client/revenue_recovery/recovery_decider_client.rs | external_services | impl_block | 163 | rust | null | DeciderClient | RecoveryDeciderClientInterface for | impl RecoveryDeciderClientInterface for for DeciderClient | null | null | null | null | null | null | null | null |
pub struct OrderInformationIncrementalAuthorization {
amount_details: AdditionalAmount,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | OrderInformationIncrementalAuthorization | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/payments/routing/transformers.rs
use std::collections::HashMap;
use api_models::{self, routing as routing_types};
use common_types::payments as common_payments_types;
use diesel_models::enums as storage_enums;
use euclid::{enums as dsl_enums, frontend::ast as dsl_ast};
use kgraph_utils::t... | crates/router/src/core/payments/routing/transformers.rs | router | full_file | 838 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn select_routing_result<T>(
state: &SessionState,
business_profile: &business_profile::Profile,
hyperswitch_result: T,
de_result: T,
) -> T {
let routing_result_source: Option<api_routing::RoutingResultSource> = state
.store
.find_config_by_key(&format!(
"routi... | crates/router/src/core/payments/routing/utils.rs | router | function_signature | 214 | rust | null | null | null | null | select_routing_result | null | null | null | null | null | null | null |
impl api::PaymentToken for Shift4 {} | crates/hyperswitch_connectors/src/connectors/shift4.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Shift4 | api::PaymentToken for | impl api::PaymentToken for for Shift4 | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::PaymentLinkStatus;
let (merchant_id, payment_id) = path.into_inner();
let payload = api_models::payments::PaymentLinkInitiateRequest {
payment_id,
merchant_id: merchant_id.clone(),
};
Box::pin(api::server_wrap(
flow,
state,
&... | crates/router/src/routes/payment_link.rs | router | impl_block | 189 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub struct PaymentAttemptRecordData<F>
where
F: Clone,
{
pub flow: PhantomData<F>,
pub payment_intent: PaymentIntent,
pub payment_attempt: PaymentAttempt,
pub revenue_recovery_data: RevenueRecoveryData,
pub payment_address: payment_address::PaymentAddress,
} | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | struct_definition | 63 | rust | PaymentAttemptRecordData | null | null | null | null | null | null | null | null | null | null | null |
pub struct BamboraapacRefundsResponse {
body: RefundBodyResponse,
} | crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | BamboraapacRefundsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuthMethodDetails {
#[serde(rename = "type")]
pub auth_type: common_enums::UserAuthType,
pub name: Option<OpenIdProvider>,
} | crates/api_models/src/user.rs | api_models | struct_definition | 38 | rust | AuthMethodDetails | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Redsys {} | crates/hyperswitch_connectors/src/connectors/redsys.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Redsys | api::PaymentSync for | impl api::PaymentSync for for Redsys | null | null | null | null | null | null | null | null |
pub async fn create_gsm_rule(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<gsm_api_types::GsmCreateRequest>,
) -> impl Responder {
let payload = json_payload.into_inner();
let flow = Flow::GsmRuleCreate;
Box::pin(api::server_wrap(
flow,
state.clone(),
... | crates/router/src/routes/gsm.rs | router | function_signature | 132 | rust | null | null | null | null | create_gsm_rule | null | null | null | null | null | null | null |
pub async fn get_total_payment_method_count_core(
state: &SessionState,
merchant_context: &domain::MerchantContext,
) -> RouterResult<api::TotalPaymentMethodCountResponse> {
let db = &*state.store;
let total_count = db
.get_payment_method_count_by_merchant_id_status(
merchant_contex... | crates/router/src/core/payment_methods.rs | router | function_signature | 143 | rust | null | null | null | null | get_total_payment_method_count_core | null | null | null | null | null | null | null |
File: crates/api_models/src/admin.rs
Public functions: 40
Public structs: 67
use std::collections::{HashMap, HashSet};
use common_types::primitive_wrappers;
use common_utils::{
consts,
crypto::Encryptable,
errors::{self, CustomResult},
ext_traits::Encode,
id_type, link_utils, pii,
};
#[cfg(featu... | crates/api_models/src/admin.rs#chunk0 | api_models | chunk | 8,191 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.UpiIntentData
{
"type": "object"
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 22 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"UpiIntentData"
] | null | null | null | null |
pub struct FlexitiAuthType {
pub(super) client_id: Secret<String>,
pub(super) client_secret: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/flexiti/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | FlexitiAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub struct FraudCheckSaleData {
pub amount: i64,
pub order_details: Option<Vec<OrderDetailsWithAmount>>,
pub currency: Option<common_enums::Currency>,
pub email: Option<Email>,
} | crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs | hyperswitch_domain_models | struct_definition | 48 | rust | FraudCheckSaleData | null | null | null | null | null | null | null | null | null | null | null |
pub struct TestPayment {
pub payment_id: id_type::PaymentId,
} | crates/api_models/src/user/dashboard_metadata.rs | api_models | struct_definition | 17 | rust | TestPayment | null | null | null | null | null | null | null | null | null | null | null |
pub struct NoonPaymentsResponse {
result: NoonPaymentsResponseResult,
} | crates/hyperswitch_connectors/src/connectors/noon/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | NoonPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
/// set payment connector
pub fn set_payment_connector(&mut self, connector: RoutableConnectorChoice) {
self.payment_connector = Some(format!(
"{:?}:{:?}",
connector.connector,
connector
.merchant_connector_id
.map(|id| id.get_string_repr()... | crates/hyperswitch_interfaces/src/events/routing_api_logs.rs | hyperswitch_interfaces | function_signature | 76 | rust | null | null | null | null | set_payment_connector | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.MandateStatus
{
"type": "string",
"description": "The status of the mandate, which indicates whether it can be used to initiate a payment.",
"enum": [
"active",
"inactive",
"pending",
"revoked"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 69 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"MandateStatus"
] | null | null | null | null |
pub fn is_surcharge_zero(&self) -> bool {
self.surcharge_amount == MinorUnit::new(0)
&& self.tax_amount.unwrap_or_default() == MinorUnit::new(0)
}
pub fn get_total_surcharge_amount(&self) -> MinorUnit {
self.surcharge_amount + self.tax_amount.unwrap_or_default()
}
pub fn... | crates/api_models/src/payments.rs#chunk2 | api_models | chunk | 8,192 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn new_token(
email: domain::UserEmail,
entity: Option<Entity>,
flow: domain::Origin,
settings: &configs::Settings,
) -> UserResult<String> {
let expiration_duration = std::time::Duration::from_secs(consts::EMAIL_TOKEN_TIME_IN_SECS);
let exp = jwt::generate_... | crates/router/src/services/email/types.rs | router | function_signature | 124 | rust | null | null | null | null | new_token | null | null | null | null | null | null | null |
impl ConnectorCommon for Nexinets {
fn id(&self) -> &'static str {
"nexinets"
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
connectors.nexinets.base_url.as_ref()
}
fn get_a... | crates/hyperswitch_connectors/src/connectors/nexinets.rs | hyperswitch_connectors | impl_block | 537 | rust | null | Nexinets | ConnectorCommon for | impl ConnectorCommon for for Nexinets | null | null | null | null | null | null | null | null |
impl CrmManagerConfig {
/// Verifies that the client configuration is usable
pub fn validate(&self) -> Result<(), InvalidCrmConfig> {
match self {
Self::HubspotProxy { hubspot_proxy } => hubspot_proxy.validate(),
Self::NoCrm => Ok(()),
}
}
/// Retrieves the appro... | crates/external_services/src/crm.rs | external_services | impl_block | 145 | rust | null | CrmManagerConfig | null | impl CrmManagerConfig | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Novalnet {} | crates/hyperswitch_connectors/src/connectors/novalnet.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Novalnet | api::PaymentSync for | impl api::PaymentSync for for Novalnet | null | null | null | null | null | null | null | null |
File: crates/drainer/src/stream.rs
Public functions: 6
use std::collections::HashMap;
use redis_interface as redis;
use router_env::{logger, tracing};
use crate::{errors, metrics, Store};
pub type StreamEntries = Vec<(String, HashMap<String, String>)>;
pub type StreamReadResult = HashMap<String, StreamEntries>;
i... | crates/drainer/src/stream.rs | drainer | full_file | 1,049 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/// Transforms incoming webhook through UCS
pub async fn transform_incoming_webhook(
&self,
webhook_transform_request: PaymentServiceTransformRequest,
connector_auth_metadata: ConnectorAuthMetadata,
grpc_headers: GrpcHeaders,
) -> UnifiedConnectorServiceResult<tonic::Response<Pay... | crates/external_services/src/grpc_client/unified_connector_service.rs | external_services | function_signature | 216 | rust | null | null | null | null | transform_incoming_webhook | null | null | null | null | null | null | null |
pub struct ListCountriesCurrenciesRequest {
pub connector: api_enums::Connector,
pub payment_method_type: api_enums::PaymentMethodType,
} | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 33 | rust | ListCountriesCurrenciesRequest | null | null | null | null | null | null | null | null | null | null | null |
impl RequestBuilder for RouterRequestBuilder {
fn json(&mut self, body: serde_json::Value) {
self.inner = self.inner.take().map(|r| r.json(&body));
}
fn url_encoded_form(&mut self, body: serde_json::Value) {
self.inner = self.inner.take().map(|r| r.form(&body));
}
fn timeout(&mut se... | crates/router/src/services/api/client.rs | router | impl_block | 345 | rust | null | RouterRequestBuilder | RequestBuilder for | impl RequestBuilder for for RouterRequestBuilder | null | null | null | null | null | null | null | null |
pub async fn list_delivery_attempts(
state: SessionState,
merchant_id: common_utils::id_type::MerchantId,
initial_attempt_id: String,
) -> RouterResponse<Vec<api::webhook_events::EventRetrieveResponse>> {
let store = state.store.as_ref();
let key_manager_state = &(&state).into();
let key_store ... | crates/router/src/core/webhooks/webhook_events.rs | router | function_signature | 300 | rust | null | null | null | null | list_delivery_attempts | null | null | null | null | null | null | null |
pub async fn get_user_email_from_oidc_provider(
state: &SessionState,
redirect_url: String,
redirect_state: Secret<String>,
base_url: Secret<String>,
client_id: Secret<String>,
authorization_code: Secret<String>,
client_secret: Secret<String>,
) -> UserResult<UserEmail> {
let nonce = get... | crates/router/src/services/openidconnect.rs | router | function_signature | 468 | rust | null | null | null | null | get_user_email_from_oidc_provider | null | null | null | null | null | null | null |
impl PaypalAuthType {
pub fn get_credentials(
&self,
) -> CustomResult<&PaypalConnectorCredentials, errors::ConnectorError> {
match self {
Self::TemporaryAuth => Err(errors::ConnectorError::InvalidConnectorConfig {
config: "TemporaryAuth found in connector_account_det... | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | impl_block | 87 | rust | null | PaypalAuthType | null | impl PaypalAuthType | null | null | null | null | null | null | null | null |
File: crates/api_models/src/events/apple_pay_certificates_migration.rs
use common_utils::events::ApiEventMetric;
use crate::apple_pay_certificates_migration::ApplePayCertificatesMigrationResponse;
impl ApiEventMetric for ApplePayCertificatesMigrationResponse {
fn get_api_event_type(&self) -> Option<common_utils:... | crates/api_models/src/events/apple_pay_certificates_migration.rs | api_models | full_file | 91 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundResponse {
pub correlation_id: String,
pub transaction_status: RefundStatus,
pub validation_status: String,
pub transaction_type: String,
pub transaction_id: String,
pub transaction_tag: Option<String>,
pub method: Option<String>,
pub amount: String,
pub currency: St... | crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs | hyperswitch_connectors | struct_definition | 101 | rust | RefundResponse | null | null | null | null | null | null | null | null | null | null | null |
pub(crate) fn get_signifyd_fulfillments_from_frm_fulfillment_request(
fulfillment_req: &FrmFulfillmentRequest,
) -> Vec<Fulfillments> {
fulfillment_req
.fulfillments
.iter()
.map(|fulfillment| Fulfillments {
shipment_id: fulfillment.shipment_id.clone(),
products: ... | crates/hyperswitch_connectors/src/connectors/signifyd/transformers/api.rs | hyperswitch_connectors | function_signature | 193 | rust | null | null | null | null | get_signifyd_fulfillments_from_frm_fulfillment_request | null | null | null | null | null | null | null |
pub struct StripebillingRefundRequest {
pub amount: StringMinorUnit,
} | crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | StripebillingRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
impl IncomingWebhook for Plaid {
fn get_webhook_object_reference_id(
&self,
_request: &IncomingWebhookRequestDetails<'_>,
) -> CustomResult<ObjectReferenceId, ConnectorError> {
Err((ConnectorError::WebhooksNotImplemented).into())
}
fn get_webhook_event_type(
&self,
... | crates/hyperswitch_connectors/src/connectors/plaid.rs | hyperswitch_connectors | impl_block | 176 | rust | null | Plaid | IncomingWebhook for | impl IncomingWebhook for for Plaid | null | null | null | null | null | null | null | null |
pub struct NodeData {
id: String,
status: BraintreePaymentStatus,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | NodeData | null | null | null | null | null | null | null | null | null | null | null |
impl WebhookResponse {
pub async fn get_outgoing_webhook_response_content(
self,
) -> webhook_events::OutgoingWebhookResponseContent {
let status_code = self.response.status();
let response_headers = self
.response
.headers()
.iter()
.map(|... | crates/router/src/core/webhooks/types.rs | router | impl_block | 290 | rust | null | WebhookResponse | null | impl WebhookResponse | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::RoutingLinkConfig;
let wrapper = routing_types::RoutingLinkWrapper {
profile_id: path.into_inner(),
algorithm_id: json_payload.into_inner(),
};
Box::pin(oss_api::server_wrap(
flow,
state,
&req,
wrapper.clone(),
|s... | crates/router/src/routes/routing.rs | router | impl_block | 286 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub struct FileId {
pub file_id: String,
} | crates/router/src/types/api/files.rs | router | struct_definition | 13 | rust | FileId | null | null | null | null | null | null | null | null | null | null | null |
pub struct EuclidApiClient; | crates/router/src/core/payments/routing/utils.rs | router | struct_definition | 6 | rust | EuclidApiClient | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/schemas/outgoing--webhook.mdx
# Type: Doc File
---
openapi-schema: OutgoingWebhook
--- | api-reference/v1/schemas/outgoing--webhook.mdx | null | doc_file | 33 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/masking/src/lib.rs
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide))]
#![cfg_attr(docsrs, doc(cfg_hide(doc)))]
#![warn(missing_docs)]
//! Personal Identifiable Information protection. Wrapper types and traits for secret management which help ensure they aren't accidentally copied, logged, or other... | crates/masking/src/lib.rs | masking | full_file | 396 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/prophetpay/transformers.rs
Public structs: 15
use std::collections::HashMap;
use common_enums::enums;
use common_utils::{
consts::{PROPHETPAY_REDIRECT_URL, PROPHETPAY_TOKEN},
errors::CustomResult,
request::Method,
};
use error_stack::ResultExt;
use hyper... | crates/hyperswitch_connectors/src/connectors/prophetpay/transformers.rs | hyperswitch_connectors | full_file | 5,083 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct WellsfargoZeroMandateRequest {
processing_information: ProcessingInformation,
payment_information: PaymentInformation,
order_information: OrderInformationWithBill,
client_reference_information: ClientReferenceInformation,
} | crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs | hyperswitch_connectors | struct_definition | 44 | rust | WellsfargoZeroMandateRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct Deposited {
pub amount: Amount,
pub status: String,
pub destination: String,
pub exchange_rate: Option<serde_json::Value>,
pub autoconversion_status: String,
pub autoconversion_enabled: bool,
} | crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs | hyperswitch_connectors | struct_definition | 52 | rust | Deposited | null | null | null | null | null | null | null | null | null | null | null |
pub fn proxy_create_attempt_amount_details(
&self,
_confirm_intent_request: &api_models::payments::ProxyPaymentsRequest,
) -> 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 | 300 | rust | null | null | null | null | proxy_create_attempt_amount_details | null | null | null | null | null | null | null |
pub fn update_payment_method_and_pm_id(
&mut self,
payment_method_id: id_type::GlobalPaymentMethodId,
payment_method: payment_methods::PaymentMethod,
) {
self.payment_attempt.payment_method_id = Some(payment_method_id);
self.payment_method = Some(payment_method);
} | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | function_signature | 64 | rust | null | null | null | null | update_payment_method_and_pm_id | null | null | null | null | null | null | null |
pub async fn routing_update_default_config() {} | crates/openapi/src/routes/profile.rs | openapi | function_signature | 9 | rust | null | null | null | null | routing_update_default_config | null | null | null | null | null | null | null |
pub async fn get_metrics(
pool: &AnalyticsProvider,
ex_rates: &Option<ExchangeRates>,
auth: &AuthInfo,
req: GetPaymentMetricRequest,
) -> AnalyticsResult<PaymentsMetricsResponse<MetricsBucketResponse>> {
let mut metrics_accumulator: HashMap<
PaymentMetricsBucketIdentifier,
PaymentMet... | crates/analytics/src/payments/core.rs | analytics | function_signature | 2,420 | rust | null | null | null | null | get_metrics | null | null | null | null | null | null | null |
PidResponseInvalidFormat,
PspNameNotFound,
LangIsMissing,
FailureCallbackUrlInvalid,
SuccessRedirectUrlInvalid,
FailureRedirectUrlInvalid,
LangValueInvalid,
OnlineDepositSessionTimeout,
AccessPaymentPageRouteFieldMissing,
AmountNotMatch,
PidCallbackFieldsMissing,
TokenNot... | crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs#chunk1 | hyperswitch_connectors | chunk | 637 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct KafkaDisputeEvent<'a> {
pub dispute_id: &'a String,
pub dispute_amount: MinorUnit,
pub currency: storage_enums::Currency,
pub dispute_stage: &'a storage_enums::DisputeStage,
pub dispute_status: &'a storage_enums::DisputeStatus,
pub payment_id: &'a common_utils::id_type::PaymentId,
... | crates/router/src/services/kafka/dispute_event.rs | router | struct_definition | 363 | rust | KafkaDisputeEvent | null | null | null | null | null | null | null | null | null | null | null |
pub struct Paytm {
amount_converter: &'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/paytm.rs | hyperswitch_connectors | struct_definition | 27 | rust | Paytm | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentMetricAccumulator for SuccessRateAccumulator {
type MetricOutput = Option<f64>;
fn add_metrics_bucket(&mut self, metrics: &PaymentMetricRow) {
if let Some(ref status) = metrics.status {
if status.as_ref() == &storage_enums::AttemptStatus::Charged {
self.success +... | crates/analytics/src/payments/accumulator.rs | analytics | impl_block | 176 | rust | null | SuccessRateAccumulator | PaymentMetricAccumulator for | impl PaymentMetricAccumulator for for SuccessRateAccumulator | null | null | null | null | null | null | null | null |
pub async fn reset_password_token_only_flow(
state: SessionState,
user_token: auth::UserFromSinglePurposeToken,
request: user_api::ResetPasswordRequest,
) -> UserResponse<()> {
let token = request.token.expose();
let email_token = auth::decode_jwt::<email_types::EmailToken>(&token, &state)
.... | crates/router/src/core/user.rs | router | function_signature | 433 | rust | null | null | null | null | reset_password_token_only_flow | null | null | null | null | null | null | null |
File: crates/euclid_macros/src/lib.rs
Public functions: 2
mod inner;
use proc_macro::TokenStream;
#[proc_macro_derive(EnumNums)]
pub fn enum_nums(ts: TokenStream) -> TokenStream {
inner::enum_nums_inner(ts)
}
#[proc_macro]
pub fn knowledge(ts: TokenStream) -> TokenStream {
match inner::knowledge_inner(ts.i... | crates/euclid_macros/src/lib.rs | euclid_macros | full_file | 107 | null | null | 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.