text string | file_path string | module string | type string | tokens int64 | language string | struct_name string | type_name string | trait_name string | impl_type string | function_name string | source string | section string | keys list | macro_type string | url string | title string | chunk_index int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pub async fn make_card_network_tokenization_request(
state: &routes::SessionState,
card: &api_payment_methods::CardDetail,
customer_id: &id_type::GlobalCustomerId,
) -> CustomResult<(NetworkTokenDetails, String), errors::NetworkTokenizationError> {
let card_data = pm_types::CardData {
card_numbe... | crates/router/src/core/payment_methods/network_tokenization.rs | router | function_signature | 437 | rust | null | null | null | null | make_card_network_tokenization_request | null | null | null | null | null | null | null |
pub fn get_connector_transaction_id(
&self,
) -> errors::CustomResult<String, errors::ValidationError> {
match self {
Self::ConnectorTransactionId(txn_id) => Ok(txn_id.to_string()),
_ => Err(errors::ValidationError::IncorrectValueProvided {
field_name: "connec... | crates/hyperswitch_domain_models/src/router_request_types.rs | hyperswitch_domain_models | function_signature | 88 | rust | null | null | null | null | get_connector_transaction_id | null | null | null | null | null | null | null |
pub struct ShipToList {
#[serde(skip_serializing_if = "Option::is_none")]
first_name: Option<Secret<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
last_name: Option<Secret<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
address: Option<Secret<String>>,
#[serde(skip_s... | crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs | hyperswitch_connectors | struct_definition | 186 | rust | ShipToList | null | null | null | null | null | null | null | null | null | null | null |
pub struct FiuuAuthType {
pub(super) merchant_id: Secret<String>,
pub(super) verify_key: Secret<String>,
pub(super) secret_key: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs | hyperswitch_connectors | struct_definition | 39 | rust | FiuuAuthType | null | null | null | null | null | null | null | null | null | null | null |
Self::Japan => CountryAlpha2::JP,
Self::Jersey => CountryAlpha2::JE,
Self::Jordan => CountryAlpha2::JO,
Self::Kazakhstan => CountryAlpha2::KZ,
Self::Kenya => CountryAlpha2::KE,
Self::Kiribati => CountryAlpha2::KI,
Self::KoreaDemocraticP... | crates/common_enums/src/transformers.rs#chunk1 | common_enums | chunk | 8,189 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn complete_authorize_preprocessing_steps<F: Clone>(
state: &SessionState,
router_data: &types::RouterData<F, types::CompleteAuthorizeData, types::PaymentsResponseData>,
confirm: bool,
connector: &api::ConnectorData,
) -> RouterResult<types::RouterData<F, types::CompleteAuthorizeData, types::P... | crates/router/src/core/payments/flows/complete_authorize_flow.rs | router | function_signature | 434 | rust | null | null | null | null | complete_authorize_preprocessing_steps | null | null | null | null | null | null | null |
pub async fn build_cloned_connector_create_request(
source_mca: DomainMerchantConnectorAccount,
destination_profile_id: Option<id_type::ProfileId>,
destination_connector_label: Option<String>,
) -> UserResult<admin_api::MerchantConnectorCreate> {
let source_mca_name = source_mca
.connector_name
... | crates/router/src/utils/user.rs | router | function_signature | 749 | rust | null | null | null | null | build_cloned_connector_create_request | null | null | null | null | null | null | null |
pub async fn create_domain_model(
payment_intent: &super::PaymentIntent,
cell_id: id_type::CellId,
storage_scheme: storage_enums::MerchantStorageScheme,
request: &api_models::payments::PaymentsConfirmIntentRequest,
encrypted_data: DecryptedPaymentAttempt,
) -> CustomResult<Se... | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | function_signature | 686 | rust | null | null | null | null | create_domain_model | null | null | null | null | null | null | null |
pub async fn get_org_auth_event_sankey(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<TimeRange>,
) -> impl Responder {
let flow = AnalyticsFlow::GetSankey;
let payload = json_payload.into_inner();
Box::pin(api::server_wrap(
... | crates/router/src/analytics.rs | router | function_signature | 246 | rust | null | null | null | null | get_org_auth_event_sankey | null | null | null | null | null | null | null |
pub async fn get_merchant_dispute_filters(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<api_models::analytics::GetDisputeFilterRequest>,
) -> impl Responder {
let flow = AnalyticsFlow::GetDisputeFilters;
Box::pin(api::server_wrap(
... | crates/router/src/analytics.rs | router | function_signature | 234 | rust | null | null | null | null | get_merchant_dispute_filters | null | null | null | null | null | null | null |
pub struct PaymentMethodMetadata {
pub payment_method_tokenization: std::collections::HashMap<String, String>,
} | crates/router/src/core/payment_methods/transformers.rs | router | struct_definition | 23 | rust | PaymentMethodMetadata | null | null | null | null | null | null | null | null | null | null | null |
pub async fn api_key_list() {} | crates/openapi/src/routes/api_keys.rs | openapi | function_signature | 8 | rust | null | null | null | null | api_key_list | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Paysafe {} | crates/hyperswitch_connectors/src/connectors/paysafe.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Paysafe | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Paysafe | null | null | null | null | null | null | null | null |
pub struct PhonepePaymentsResponse {
status: PhonepePaymentStatus,
id: String,
} | crates/hyperswitch_connectors/src/connectors/phonepe/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | PhonepePaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
impl CardInfoBuilder<CardInfoResponse> {
pub fn build(self) -> cards_info_api_types::CardInfoMigrateResponseRecord {
match self.card_info {
Some(card_info) => cards_info_api_types::CardInfoMigrateResponseRecord {
card_iin: Some(card_info.card_iin),
card_issuer: ca... | crates/router/src/core/cards_info.rs | router | impl_block | 191 | rust | null | CardInfoBuilder | null | impl CardInfoBuilder | null | null | null | null | null | null | null | null |
pub async fn save_payment_method<FData>(
_state: &SessionState,
_connector_name: String,
_save_payment_method_data: SavePaymentMethodData<FData>,
_customer_id: Option<id_type::CustomerId>,
_merchant_context: &domain::MerchantContext,
_payment_method_type: Option<storage_enums::PaymentMethodType>... | crates/router/src/core/payments/tokenization.rs | router | function_signature | 155 | rust | null | null | null | null | save_payment_method | null | null | null | null | null | null | null |
File: crates/router/src/core/payments/flows/cancel_post_capture_flow.rs
use async_trait::async_trait;
use super::{ConstructFlowSpecificData, Feature};
use crate::{
core::{
errors::{ConnectorErrorExt, RouterResult},
payments::{self, access_token, helpers, transformers, PaymentData},
},
rout... | crates/router/src/core/payments/flows/cancel_post_capture_flow.rs | router | full_file | 993 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Custombilling {} | crates/hyperswitch_connectors/src/connectors/custombilling.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Custombilling | api::PaymentToken for | impl api::PaymentToken for for Custombilling | null | null | null | null | null | null | null | null |
pub async fn find_optional_resource<D, R, M>(
&self,
state: &KeyManagerState,
key_store: &MerchantKeyStore,
execute_query_fut: R,
) -> error_stack::Result<Option<D>, StorageError>
where
D: Debug + Sync + Conversion,
R: futures::Future<
Output = err... | crates/storage_impl/src/lib.rs | storage_impl | function_signature | 210 | rust | null | null | null | null | find_optional_resource | null | null | null | null | null | null | null |
pub async fn authentication_create_core(
state: SessionState,
merchant_context: domain::MerchantContext,
req: AuthenticationCreateRequest,
) -> RouterResponse<AuthenticationResponse> {
let db = &*state.store;
let merchant_account = merchant_context.get_merchant_account();
let merchant_id = merch... | crates/router/src/core/unified_authentication_service.rs | router | function_signature | 862 | rust | null | null | null | null | authentication_create_core | null | null | null | null | null | null | null |
impl api::RefundSync for Worldpayxml {} | crates/hyperswitch_connectors/src/connectors/worldpayxml.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Worldpayxml | api::RefundSync for | impl api::RefundSync for for Worldpayxml | null | null | null | null | null | null | null | null |
pub fn validate(&self) -> Result<(), ApplicationError> {
match self {
Self::Kafka { kafka } => kafka.validate(),
Self::Logs => Ok(()),
}
} | crates/router/src/events.rs | router | function_signature | 41 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Cashtocode {} | crates/hyperswitch_connectors/src/connectors/cashtocode.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Cashtocode | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Cashtocode | null | null | null | null | null | null | null | null |
impl common_utils::events::ApiEventMetric for ConnectorAgnosticMitChoice {} | crates/api_models/src/admin.rs | api_models | impl_block | 18 | rust | null | ConnectorAgnosticMitChoice | common_utils::events::ApiEventMetric for | impl common_utils::events::ApiEventMetric for for ConnectorAgnosticMitChoice | null | null | null | null | null | null | null | null |
pub struct AcquirerData {
/// The country of the acquirer.
#[schema(value_type = Country)]
pub country: Option<common_enums::Country>,
/// The fraud rate associated with the acquirer.
pub fraud_rate: Option<f64>,
} | crates/api_models/src/three_ds_decision_rule.rs | api_models | struct_definition | 57 | rust | AcquirerData | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_error_response(
operation_result: NexixpayPaymentStatus,
status_code: u16,
) -> ErrorResponse {
ErrorResponse {
status_code,
code: NO_ERROR_CODE.to_string(),
message: operation_result.to_string(),
reason: Some(operation_result.to_string()),
attempt_status: ... | crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs | hyperswitch_connectors | function_signature | 106 | rust | null | null | null | null | get_error_response | null | null | null | null | null | null | null |
pub async fn switch_profile_for_user_in_org_and_merchant(
state: SessionState,
request: user_api::SwitchProfileRequest,
user_from_token: auth::UserFromToken,
) -> UserResponse<user_api::TokenResponse> {
if user_from_token.profile_id == request.profile_id {
return Err(UserErrors::InvalidRoleOpera... | crates/router/src/core/user.rs | router | function_signature | 955 | rust | null | null | null | null | switch_profile_for_user_in_org_and_merchant | null | null | null | null | null | null | null |
impl api::RefundExecute for Cryptopay {} | crates/hyperswitch_connectors/src/connectors/cryptopay.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Cryptopay | api::RefundExecute for | impl api::RefundExecute for for Cryptopay | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.TokenizeCardRequest
{
"type": "object",
"required": [
"raw_card_number",
"card_expiry_month",
"card_expiry_year"
],
"properties": {
"raw_card_number": {
"type": "string",
"description": "Card Number",
"example": "4111111145551142"
},
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 440 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"TokenizeCardRequest"
] | null | null | null | null |
pub struct PlacetopayStatusResponse {
status: PlacetopayTransactionStatus,
} | crates/hyperswitch_connectors/src/connectors/placetopay/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | PlacetopayStatusResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_compatible_connector(&self) -> Option<api_models::enums::Connector> {
let metadata: Option<api_models::admin::MerchantAccountMetadata> =
self.metadata.as_ref().and_then(|meta| {
meta.clone()
.parse_value("MerchantAccountMetadata")
.m... | crates/hyperswitch_domain_models/src/merchant_account.rs | hyperswitch_domain_models | function_signature | 98 | rust | null | null | null | null | get_compatible_connector | null | null | null | null | null | null | null |
pub fn check_if_pull_mechanism_for_external_3ds_enabled_from_connector_metadata(
metadata: Option<Value>,
) -> bool {
let external_three_ds_connector_metadata: Option<ExternalThreeDSConnectorMetadata> = metadata
.parse_value("ExternalThreeDSConnectorMetadata")
.map_err(|err| logger::warn... | crates/router/src/utils.rs | router | function_signature | 121 | rust | null | null | null | null | check_if_pull_mechanism_for_external_3ds_enabled_from_connector_metadata | null | null | null | null | null | null | null |
pub async fn get_token(&self, state: &SessionState) -> UserResult<Secret<String>> {
match self.next_flow {
UserFlow::SPTFlow(spt_flow) => spt_flow.generate_spt(state, self).await,
UserFlow::JWTFlow(jwt_flow) => {
#[cfg(feature = "email")]
{
... | crates/router/src/types/domain/user/decision_manager.rs | router | function_signature | 259 | rust | null | null | null | null | get_token | null | null | null | null | null | null | null |
pub fn check_permission_exists(&self, required_permission: Permission) -> bool {
required_permission.entity_type() <= self.entity_type
&& self.get_permission_groups().iter().any(|group| {
required_permission.scope() <= group.scope()
&& group.resources().contains(&... | crates/router/src/services/authorization/roles.rs | router | function_signature | 65 | rust | null | null | null | null | check_permission_exists | null | null | null | null | null | null | null |
pub fn mk_card_value1(
card_number: cards::CardNumber,
exp_year: String,
exp_month: String,
name_on_card: Option<String>,
nickname: Option<String>,
card_last_four: Option<String>,
card_token: Option<String>,
) -> CustomResult<String, errors::VaultError> {
let value1 = api::TokenizedCardV... | crates/router/src/core/payment_methods/transformers.rs | router | function_signature | 156 | rust | null | null | null | null | mk_card_value1 | null | null | null | null | null | null | null |
pub struct EbanxCancelResponse {
#[serde(rename = "type")]
status: EbanxCancelStatus,
message: String,
} | crates/hyperswitch_connectors/src/connectors/ebanx/transformers.rs | hyperswitch_connectors | struct_definition | 31 | rust | EbanxCancelResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn server(config: routes::AppState) -> Scope {
web::scope("/payment_methods")
.app_data(web::Data::new(config))
.service(web::resource("/{id}/detach").route(web::post().to(mandates::revoke_mandate)))
} | crates/router/src/compatibility/stripe/app.rs | router | function_signature | 60 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
impl api::PaymentVoid for Facilitapay {} | crates/hyperswitch_connectors/src/connectors/facilitapay.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Facilitapay | api::PaymentVoid for | impl api::PaymentVoid for for Facilitapay | null | null | null | null | null | null | null | null |
pub fn generate_aes256_key() -> errors::CustomResult<[u8; | crates/router/src/services.rs | router | function_signature | 18 | rust | null | null | null | null | generate_aes256_key | null | null | null | null | null | null | null |
pub struct MerchantCountryCode(String); | crates/common_types/src/payments.rs | common_types | struct_definition | 7 | rust | MerchantCountryCode | null | null | null | null | null | null | null | null | null | null | null |
impl RequestExtendedAuthorizationBool {
/// returns the inner bool value
pub fn is_true(&self) -> bool {
self.0
}
} | crates/common_utils/src/types/primitive_wrappers.rs | common_utils | impl_block | 34 | rust | null | RequestExtendedAuthorizationBool | null | impl RequestExtendedAuthorizationBool | null | null | null | null | null | null | null | null |
impl PartialEq for DisputeMetricsBucketIdentifier {
fn eq(&self, other: &Self) -> bool {
let mut left = DefaultHasher::new();
self.hash(&mut left);
let mut right = DefaultHasher::new();
other.hash(&mut right);
left.finish() == right.finish()
}
} | crates/api_models/src/analytics/disputes.rs | api_models | impl_block | 70 | rust | null | DisputeMetricsBucketIdentifier | PartialEq for | impl PartialEq for for DisputeMetricsBucketIdentifier | null | null | null | null | null | null | null | null |
pub fn validate_schema(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let input = syn::parse_macro_input!(input as syn::DeriveInput);
macros::validate_schema_derive(input)
.unwrap_or_else(|error| error.into_compile_error())
.into()
} | crates/router_derive/src/lib.rs | router_derive | function_signature | 64 | rust | null | null | null | null | validate_schema | null | null | null | null | null | null | null |
impl api::PaymentVoid for Payu {} | crates/hyperswitch_connectors/src/connectors/payu.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Payu | api::PaymentVoid for | impl api::PaymentVoid for for Payu | null | null | null | null | null | null | null | null |
pub struct CreateUserThemeRequest {
pub entity_type: EntityType,
pub theme_name: String,
pub theme_data: ThemeData,
pub email_config: Option<EmailThemeConfig>,
} | crates/api_models/src/user/theme.rs | api_models | struct_definition | 39 | rust | CreateUserThemeRequest | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Getnet {} | crates/hyperswitch_connectors/src/connectors/getnet.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Getnet | api::RefundExecute for | impl api::RefundExecute for for Getnet | null | null | null | null | null | null | null | null |
pub struct BraintreeAuthType {
pub(super) public_key: Secret<String>,
pub(super) private_key: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | BraintreeAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub struct Score {
factor_codes: Option<Vec<String>>,
result: Option<RiskResult>,
model_used: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | Score | null | null | null | null | null | null | null | null | null | null | null |
pub struct RedirectUrl {
pub return_url: Option<String>,
pub url: Option<String>,
} | crates/router/src/compatibility/stripe/setup_intents/types.rs | router | struct_definition | 21 | rust | RedirectUrl | null | null | null | null | null | null | null | null | null | null | null |
File: crates/test_utils/tests/connectors/nuvei_ui.rs
use serial_test::serial;
use thirtyfour::{prelude::*, WebDriver};
use crate::{selenium::*, tester};
struct NuveiSeleniumTest;
impl SeleniumTest for NuveiSeleniumTest {
fn get_connector_name(&self) -> String {
"nuvei".to_string()
}
}
async fn shou... | crates/test_utils/tests/connectors/nuvei_ui.rs | test_utils | full_file | 2,497 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct FrmData {
pub payment_intent: PaymentIntent,
pub payment_attempt: PaymentAttempt,
pub merchant_account: MerchantAccount,
pub fraud_check: FraudCheck,
pub address: PaymentAddress,
pub connector_details: ConnectorDetailsCore,
pub order_details: Option<Vec<OrderDetailsWithAmount>>,
... | crates/router/src/core/fraud_check/types.rs | router | struct_definition | 88 | rust | FrmData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn retrieve_decision_manager_config(
state: web::Data<AppState>,
req: HttpRequest,
) -> impl Responder {
let flow = Flow::DecisionManagerRetrieveConfig;
Box::pin(oss_api::server_wrap(
flow,
state,
&req,
(),
|state, auth: auth::AuthenticationData, _, _| {... | crates/router/src/routes/routing.rs | router | function_signature | 211 | rust | null | null | null | null | retrieve_decision_manager_config | null | null | null | null | null | null | null |
File: crates/router/src/core/health_check.rs
#[cfg(feature = "olap")]
use analytics::health_check::HealthCheck;
#[cfg(feature = "dynamic_routing")]
use api_models::health_check::HealthCheckMap;
use api_models::health_check::HealthState;
use error_stack::ResultExt;
use router_env::logger;
use crate::{
consts,
... | crates/router/src/core/health_check.rs | router | full_file | 1,908 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/// Get string representation of enclosed ID type
pub fn to_str(&self) -> &str {
match self {
Self::Payment(id) => id.get_string_repr(),
Self::Customer(id) => id.get_string_repr(),
Self::PaymentMethodSession(id) => id.get_string_repr(),
}
} | crates/common_utils/src/types/authentication.rs | common_utils | function_signature | 67 | rust | null | null | null | null | to_str | null | null | null | null | null | null | null |
pub struct GlobepayRefundResponse {
pub result_code: Option<GlobepayRefundStatus>,
pub refund_id: Option<String>,
pub return_code: GlobepayReturnCode,
pub return_msg: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/globepay/transformers.rs | hyperswitch_connectors | struct_definition | 51 | rust | GlobepayRefundResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct DeutschebankThreeDSInitializeRequestMeansOfPayment {
credit_card: DeutschebankThreeDSInitializeRequestCreditCard,
} | crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | DeutschebankThreeDSInitializeRequestMeansOfPayment | null | null | null | null | null | null | null | null | null | null | null |
impl common_utils::events::ApiEventMetric for RelayRetrieveBody {} | crates/api_models/src/relay.rs | api_models | impl_block | 14 | rust | null | RelayRetrieveBody | common_utils::events::ApiEventMetric for | impl common_utils::events::ApiEventMetric for for RelayRetrieveBody | null | null | null | null | null | null | null | null |
Web Documentation: For SaaS Businesses | Hyperswitch
# Type: Web Doc
Hyperswitch empowers SaaS businesses with a comprehensive, modular, and scalable payment solution tailored to enhance subscription management, reduce passive churn, and optimize payment operations globally.
Whether you're a startup or an established ... | https://docs.hyperswitch.io/use-cases/for-saas-providers | null | web_doc_file | 399 | doc | null | null | null | null | null | web | null | null | null | https://docs.hyperswitch.io/use-cases/for-saas-providers | For SaaS Businesses | Hyperswitch | null |
pub struct Entity {
pub entity_id: String,
pub entity_type: EntityType,
} | crates/router/src/services/email/types.rs | router | struct_definition | 19 | rust | Entity | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/flexiti.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use common_enums::enums;
use common_utils::{
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Request, RequestBuilder, RequestContent},
typ... | crates/hyperswitch_connectors/src/connectors/flexiti.rs | hyperswitch_connectors | full_file | 5,659 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct NexinetsPreAuthOrDebitResponse {
order_id: String,
transaction_type: NexinetsTransactionType,
transactions: Vec<NexinetsTransaction>,
payment_instrument: PaymentInstrument,
redirect_url: Option<Url>,
} | crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs | hyperswitch_connectors | struct_definition | 55 | rust | NexinetsPreAuthOrDebitResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct CreateRoleRequest {
pub role_name: String,
pub groups: Vec<PermissionGroup>,
pub role_scope: RoleScope,
pub entity_type: Option<EntityType>,
} | crates/api_models/src/user_role/role.rs | api_models | struct_definition | 40 | rust | CreateRoleRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/payment_methods/cards.rs
Public functions: 48
Public structs: 2
use std::{
collections::{HashMap, HashSet},
fmt::Debug,
str::FromStr,
};
use ::payment_methods::{
configs::payment_connector_required_fields::{
get_billing_required_fields, get_shipping_required_fiel... | crates/router/src/core/payment_methods/cards.rs#chunk0 | router | chunk | 8,187 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentListConstraints
{
"type": "object",
"properties": {
"customer_id": {
"type": "string",
"description": "The identifier for customer",
"example": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"nullable": true,
"maxLength": 64,
"minLength": 1
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 628 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentListConstraints"
] | null | null | null | null |
pub(crate) fn get_webhook_object_from_body(
body: &[u8],
) -> CustomResult<SantanderWebhookBody, common_utils::errors::ParsingError> {
let webhook: SantanderWebhookBody = body.parse_struct("SantanderIncomingWebhook")?;
Ok(webhook)
} | crates/hyperswitch_connectors/src/connectors/santander/transformers.rs | hyperswitch_connectors | function_signature | 66 | rust | null | null | null | null | get_webhook_object_from_body | null | null | null | null | null | null | null |
impl api::PayoutRecipientAccount for Nomupay {} | crates/hyperswitch_connectors/src/connectors/nomupay.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Nomupay | api::PayoutRecipientAccount for | impl api::PayoutRecipientAccount for for Nomupay | null | null | null | null | null | null | null | null |
pub struct BarclaycardThreeDSMetadata {
three_ds_data: BarclaycardConsumerAuthValidateResponse,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | BarclaycardThreeDSMetadata | null | null | null | null | null | null | null | null | null | null | null |
pub struct NordeaPaymentsConfirmRequest {
/// Authentication method to use for the signing of payment.
#[serde(skip_serializing_if = "Option::is_none")]
pub authentication_method: Option<NordeaAuthenticationMethod>,
/// Language of the signing page that will be displayed to client, ISO639-1 and 639-2, d... | crates/hyperswitch_connectors/src/connectors/nordea/requests.rs | hyperswitch_connectors | struct_definition | 126 | rust | NordeaPaymentsConfirmRequest | null | null | null | null | null | null | null | null | null | null | null |
pub fn validate(&self) -> Result<(), ApplicationError> {
use common_utils::fp_utils::when;
when(self.host.is_default_or_empty(), || {
Err(ApplicationError::InvalidConfigurationValueError(
"server host must not be empty".into(),
))
})?;
when(self.... | crates/router/src/configs/validations.rs | router | function_signature | 101 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
impl api::Payment for Boku {} | crates/hyperswitch_connectors/src/connectors/boku.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Boku | api::Payment for | impl api::Payment for for Boku | null | null | null | null | null | null | null | null |
pub async fn insert_resource<D, R, M>(
&self,
state: &KeyManagerState,
key_store: &MerchantKeyStore,
storage_scheme: MerchantStorageScheme,
create_resource_fut: R,
resource_new: M,
InsertResourceParams {
insertable,
reverse_lookups,
... | crates/storage_impl/src/kv_router_store.rs | storage_impl | function_signature | 577 | rust | null | null | null | null | insert_resource | null | null | null | null | null | null | null |
pub struct GetDisputeFilterRequest {
pub time_range: TimeRange,
#[serde(default)]
pub group_by_names: Vec<DisputeDimensions>,
} | crates/api_models/src/analytics.rs | api_models | struct_definition | 34 | rust | GetDisputeFilterRequest | null | null | null | null | null | null | null | null | null | null | null |
/// get_pm_filters_cgraph_key
pub fn get_pm_filters_cgraph_key(&self) -> String {
format!("pm_filters_cgraph_{}", self.get_string_repr())
} | crates/common_utils/src/id_type/merchant.rs | common_utils | function_signature | 39 | rust | null | null | null | null | get_pm_filters_cgraph_key | null | null | null | null | null | null | null |
pub fn build(self) -> Request {
Request {
method: self.method,
url: self.url,
headers: self.headers,
certificate: self.certificate,
certificate_key: self.certificate_key,
body: self.body,
ca_certificate: self.ca_certificate,
... | crates/common_utils/src/request.rs | common_utils | function_signature | 63 | rust | null | null | null | null | build | null | null | null | null | null | null | null |
pub struct RoutingPayloadWrapper {
pub updated_config: Vec<RoutableConnectorChoice>,
pub profile_id: common_utils::id_type::ProfileId,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 33 | rust | RoutingPayloadWrapper | null | null | null | null | null | null | null | null | null | null | null |
pub async fn routing_unlink_config() {} | crates/openapi/src/routes/routing.rs | openapi | function_signature | 9 | rust | null | null | null | null | routing_unlink_config | null | null | null | null | null | null | null |
impl<T: ForeignIDRef> RemoteStorageObject<T> {
pub fn get_id(&self) -> String {
match self {
Self::ForeignID(id) => id.clone(),
Self::Object(i) => i.foreign_id(),
}
}
} | crates/hyperswitch_domain_models/src/lib.rs | hyperswitch_domain_models | impl_block | 56 | rust | null | RemoteStorageObject | null | impl RemoteStorageObject | null | null | null | null | null | null | null | null |
pub fn authenticate_authentication_client_secret_and_check_expiry(
req_client_secret: &String,
authentication: &diesel_models::authentication::Authentication,
) -> RouterResult<()> {
let stored_client_secret = authentication
.authentication_client_secret
.clone()
.get_required_value(... | crates/router/src/core/unified_authentication_service/utils.rs | router | function_signature | 197 | rust | null | null | null | null | authenticate_authentication_client_secret_and_check_expiry | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/iatapay.rs
use hyperswitch_domain_models::address::{Address, AddressDetails, PhoneDetails};
use masking::Secret;
use router::types::{self, api, storage::enums, AccessToken};
use crate::{
connector_auth,
utils::{
self, get_connector_transaction_id, Connector, Connec... | crates/router/tests/connectors/iatapay.rs | router | full_file | 1,346 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct GenericVariableInput<T> {
input: T,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | GenericVariableInput | null | null | null | null | null | null | null | null | null | null | null |
File: crates/test_utils/src/newman_runner.rs
Public functions: 8
Public structs: 2
use std::{
env,
fs::{self, OpenOptions},
io::{self, Write},
path::Path,
process::{exit, Command},
};
use anyhow::{Context, Result};
use clap::{arg, command, Parser, ValueEnum};
use masking::PeekInterface;
use rege... | crates/test_utils/src/newman_runner.rs | test_utils | full_file | 3,336 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentAuthConnectorData {
pub connector: BoxedPaymentAuthConnector,
pub connector_name: super::PaymentMethodAuthConnectors,
} | crates/pm_auth/src/types/api.rs | pm_auth | struct_definition | 31 | rust | PaymentAuthConnectorData | null | null | null | null | null | null | null | null | null | null | null |
#[cfg(feature = "v1")]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, diesel::AsExpression)]
#[diesel(sql_type = diesel::sql_types::Jsonb)]
pub struct PaymentsMandateReference(
pub HashMap<common_utils::id_type::MerchantConnectorAccountId, PaymentsMandateReferenceRecord>,
);
#[cfg(feature = "v1")]
i... | crates/diesel_models/src/payment_method.rs#chunk1 | diesel_models | chunk | 2,069 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ApplePayRecurringDetails {
/// A description of the recurring payment that Apple Pay displays to the user in the payment sheet
pub payment_description: String,
/// The regular billing cycle for the recurring payment, including start and end dates, an interval, and an interval count
pub regula... | crates/diesel_models/src/types.rs | diesel_models | struct_definition | 138 | rust | ApplePayRecurringDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct BluesnapWallet {
wallet_type: BluesnapWalletTypes,
encoded_payment_token: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | BluesnapWallet | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardsNon3DSRequest {
card: CardPayment,
description: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | CardsNon3DSRequest | null | null | null | null | null | null | null | null | null | null | null |
pub fn update_requestor_card_reference(&mut self, card_reference: Option<String>) {
match self {
Self::LockerCard(c) => c.requestor_card_reference = card_reference,
Self::LockerGeneric(_) => (),
}
} | crates/router/src/core/payment_methods/transformers.rs | router | function_signature | 51 | rust | null | null | null | null | update_requestor_card_reference | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/paypal.rs
use std::str::FromStr;
use common_utils::types::MinorUnit;
use masking::Secret;
use router::types::{self, domain, storage::enums, AccessToken, ConnectorAuthType};
use crate::{
connector_auth,
utils::{self, Connector, ConnectorActions},
};
struct PaypalTest;
imp... | crates/router/tests/connectors/paypal.rs | router | full_file | 4,671 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn find_by_merchant_id_connector_txn_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
connector_txn_id: &str,
) -> StorageResult<Self> {
let (txn_id, txn_data) = common_utils::types::ConnectorTransactionId::form_id_and_data(
connector_tx... | crates/diesel_models/src/query/payment_attempt.rs | diesel_models | function_signature | 206 | rust | null | null | null | null | find_by_merchant_id_connector_txn_id | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.TaxStatus
{
"type": "string",
"enum": [
"taxable",
"exempt"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 38 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"TaxStatus"
] | null | null | null | null |
pub fn get_http_status_code_type(
status_code: u16,
) -> CustomResult<String, errors::ApiErrorResponse> {
let status_code_type = match status_code {
100..=199 => "1xx",
200..=299 => "2xx",
300..=399 => "3xx",
400..=499 => "4xx",
500..=599 => "5xx",
_ => Err(errors... | crates/router/src/utils.rs | router | function_signature | 147 | rust | null | null | null | null | get_http_status_code_type | null | null | null | null | null | null | null |
&self,
req: &SubmitEvidenceRouterData,
connectors: &Connectors,
) -> CustomResult<Option<Request>, errors::ConnectorError> {
let request = RequestBuilder::new()
.method(Method::Put)
.url(&SubmitEvidenceType::get_url(self, req, connectors)?)
.attach... | crates/hyperswitch_connectors/src/connectors/checkout.rs#chunk1 | hyperswitch_connectors | chunk | 4,713 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub(crate) async fn shutdown_listener(&self, mut rx: mpsc::Receiver<() | crates/drainer/src/handler.rs | drainer | function_signature | 19 | rust | null | null | null | null | shutdown_listener | null | null | null | null | null | null | null |
impl MasterKeyInterface for MockDb {
fn get_master_key(&self) -> &[u8] {
&[
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32,
]
}
} | crates/router/src/db.rs | router | impl_block | 151 | rust | null | MockDb | MasterKeyInterface for | impl MasterKeyInterface for for MockDb | null | null | null | null | null | null | null | null |
pub struct CeleroCustomer {
id: Option<CustomerId>,
payment_method_id: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/celero/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | CeleroCustomer | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payout_create_db_entries(
_state: &SessionState,
_merchant_context: &domain::MerchantContext,
_req: &payouts::PayoutCreateRequest,
_payout_id: &str,
_profile_id: &str,
_stored_payout_method_data: Option<&payouts::PayoutMethodData>,
_locale: &str,
_customer: Option<&domain::C... | crates/router/src/core/payouts.rs | router | function_signature | 118 | rust | null | null | null | null | payout_create_db_entries | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CardDiscovery
{
"type": "string",
"description": "Indicates the method by which a card is discovered during a payment",
"enum": [
"manual",
"saved_card",
"click_to_pay"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 61 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CardDiscovery"
] | null | null | null | null |
/// fn set_response_body
pub fn set_response_body<T: Serialize>(&mut self, response: &T) {
match masking::masked_serialize(response) {
Ok(masked) => {
self.response = Some(masked.to_string());
}
Err(er) => self.set_error(json!({"error": er.to_string()})),
... | crates/hyperswitch_interfaces/src/events/routing_api_logs.rs | hyperswitch_interfaces | function_signature | 75 | rust | null | null | null | null | set_response_body | null | null | null | null | null | null | null |
pub struct TokenizePaymentMethodRequest {
pub payment_method_id: String,
pub card_cvc: Option<masking::Secret<String>>,
} | crates/hyperswitch_domain_models/src/bulk_tokenization.rs | hyperswitch_domain_models | struct_definition | 31 | rust | TokenizePaymentMethodRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct ToggleKVResponse {
/// The identifier for the Merchant Account
#[schema(max_length = 255, example = "y3oqhf46pyzuxjbcn2giaqnb44", value_type = String)]
pub merchant_id: id_type::MerchantId,
/// Status of KV for the specific merchant
#[schema(example = true)]
pub kv_enabled: bool,
} | crates/api_models/src/admin.rs | api_models | struct_definition | 90 | rust | ToggleKVResponse | 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.