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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
File: crates/hyperswitch_connectors/src/connectors/aci/transformers.rs
Public structs: 28
use std::str::FromStr;
use common_enums::enums;
use common_utils::{id_type, pii::Email, request::Method, types::StringMajorUnit};
use error_stack::report;
use hyperswitch_domain_models::{
payment_method_data::{BankRedirectD... | crates/hyperswitch_connectors/src/connectors/aci/transformers.rs | hyperswitch_connectors | full_file | 8,120 | null | null | null | null | null | null | null | null | null | null | null | null | null |
payme_transaction_id: Option<String>,
status_error_code: Option<u32>,
}
impl TryFrom<RefundsResponseRouterData<Execute, PaymeRefundResponse>>
for RefundsRouterData<Execute>
{
type Error = error_stack::Report<errors::ConnectorError>;
fn try_from(
item: RefundsResponseRouterData<Execute, Paym... | crates/hyperswitch_connectors/src/connectors/payme/transformers.rs#chunk1 | hyperswitch_connectors | chunk | 2,039 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/bluecode.rs
use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct BluecodeTest;
... | crates/router/tests/connectors/bluecode.rs | router | full_file | 2,925 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct MerchantAcceptorResolver {
merchant_acceptor_key: String,
} | crates/hyperswitch_connectors/src/connectors/silverflow/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | MerchantAcceptorResolver | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Gpayments {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&GPAYMENTS_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
None
}
fn get_supported_webhook_flows(&self) -> Opt... | crates/hyperswitch_connectors/src/connectors/gpayments.rs | hyperswitch_connectors | impl_block | 93 | rust | null | Gpayments | ConnectorSpecifications for | impl ConnectorSpecifications for for Gpayments | null | null | null | null | null | null | null | null |
pub async fn find_last_successful_or_partially_captured_attempt_by_payment_id(
conn: &PgPooledConn,
payment_id: &common_utils::id_type::GlobalPaymentId,
) -> StorageResult<Self> {
// perform ordering on the application level instead of database level
generics::generic_filter::<<Self ... | crates/diesel_models/src/query/payment_attempt.rs | diesel_models | function_signature | 181 | rust | null | null | null | null | find_last_successful_or_partially_captured_attempt_by_payment_id | null | null | null | null | null | null | null |
pub fn is_payout_terminal_state(status: api_enums::PayoutStatus) -> bool {
!matches!(
status,
api_enums::PayoutStatus::RequiresCreation
| api_enums::PayoutStatus::RequiresConfirmation
| api_enums::PayoutStatus::RequiresPayoutMethodData
| api_enums::PayoutStatus::R... | crates/router/src/core/payouts/helpers.rs | router | function_signature | 135 | rust | null | null | null | null | is_payout_terminal_state | null | null | null | null | null | null | null |
impl OpenSearchIndexes {
pub fn validate(&self) -> Result<(), ApplicationError> {
use common_utils::{ext_traits::ConfigExt, fp_utils::when};
when(self.payment_attempts.is_default_or_empty(), || {
Err(ApplicationError::InvalidConfigurationValueError(
"Opensearch Payment A... | crates/analytics/src/opensearch.rs | analytics | impl_block | 411 | rust | null | OpenSearchIndexes | null | impl OpenSearchIndexes | null | null | null | null | null | null | null | null |
pub struct WebCheckoutDetails {
checkout_review_return_url: Option<String>,
checkout_result_return_url: Option<String>,
amazon_pay_redirect_url: Option<String>,
authorize_result_return_url: Option<String>,
sign_in_return_url: Option<String>,
sign_in_cancel_url: Option<String>,
checkout_error... | crates/hyperswitch_connectors/src/connectors/amazonpay/transformers.rs | hyperswitch_connectors | struct_definition | 96 | rust | WebCheckoutDetails | null | null | null | null | null | null | null | null | null | null | null |
let balance_pm = BalancePmData {
number: gift_card_data.number.clone(),
cvc: gift_card_data.cvc.clone(),
};
Ok(AdyenPaymentMethod::PaymentMethodBalance(Box::new(
balance_pm,
... | crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs#chunk2 | hyperswitch_connectors | chunk | 8,180 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl IncomingWebhook for Mifinity {
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/mifinity.rs | hyperswitch_connectors | impl_block | 186 | rust | null | Mifinity | IncomingWebhook for | impl IncomingWebhook for for Mifinity | null | null | null | null | null | null | null | null |
pub async fn construct_fulfillment_router_data<'a>(
_state: &'a SessionState,
_payment_intent: &'a storage::PaymentIntent,
_payment_attempt: &storage::PaymentAttempt,
_merchant_context: &domain::MerchantContext,
_connector: String,
_fulfillment_request: FrmFulfillmentRequest,
) -> RouterResult<F... | crates/router/src/core/fraud_check/flows/fulfillment_flow.rs | router | function_signature | 92 | rust | null | null | null | null | construct_fulfillment_router_data | null | null | null | null | null | null | null |
pub async fn set_blocked_count_in_cache<A>(
state: &A,
cache_key: &str,
value: i32,
expiry: i64,
) -> RouterResult<()>
where
A: SessionStateInfo + Sync,
{
let redis_conn = get_redis_connection(state)?;
redis_conn
.set_key_with_expiry(&cache_key.into(), value, expiry)
.await
... | crates/router/src/services/card_testing_guard.rs | router | function_signature | 98 | rust | null | null | null | null | set_blocked_count_in_cache | null | null | null | null | null | null | null |
File: crates/external_services/src/grpc_client.rs
Public functions: 1
Public structs: 3
/// Dyanimc Routing Client interface implementation
#[cfg(feature = "dynamic_routing")]
pub mod dynamic_routing;
/// gRPC based Heath Check Client interface implementation
#[cfg(feature = "dynamic_routing")]
pub mod health_check_... | crates/external_services/src/grpc_client.rs | external_services | full_file | 1,528 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct Store {
pub master_pool: PgPool,
pub redis_conn: Arc<RedisConnectionPool>,
pub config: StoreConfig,
pub request_id: Option<String>,
} | crates/drainer/src/services.rs | drainer | struct_definition | 39 | rust | Store | null | null | null | null | null | null | null | null | null | null | null |
pub struct ExternalVaultConnectorDetails {
/// Merchant Connector id to be stored for vault connector
#[schema(value_type = Option<String>)]
pub vault_connector_id: id_type::MerchantConnectorAccountId,
/// External vault to be used for storing payment method information
#[schema(value_type = Option... | crates/api_models/src/admin.rs | api_models | struct_definition | 82 | rust | ExternalVaultConnectorDetails | null | null | null | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Fiservemea {} | crates/hyperswitch_connectors/src/connectors/fiservemea.rs | hyperswitch_connectors | impl_block | 14 | rust | null | Fiservemea | api::MandateSetup for | impl api::MandateSetup for for Fiservemea | null | null | null | null | null | null | null | null |
pub struct WorldpayxmlRefundRequest {
pub amount: StringMinorUnit,
} | crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | WorldpayxmlRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct RevenueRecoverySettings {
pub monitoring_threshold_in_seconds: i64,
pub retry_algorithm_type: enums::RevenueRecoveryAlgorithmType,
pub recovery_timestamp: RecoveryTimestamp,
pub card_config: RetryLimitsConfig,
pub redis_ttl_in_seconds: i64,
} | crates/router/src/types/storage/revenue_recovery.rs | router | struct_definition | 61 | rust | RevenueRecoverySettings | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Santander {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&SANTANDER_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*SANTANDER_SUPPORTED_PAYMENT_METHODS)
}
fn ge... | crates/hyperswitch_connectors/src/connectors/santander.rs | hyperswitch_connectors | impl_block | 111 | rust | null | Santander | ConnectorSpecifications for | impl ConnectorSpecifications for for Santander | null | null | null | null | null | null | null | null |
pub struct StripebillingWebhookObject {
#[serde(rename = "id")]
pub invoice_id: String,
#[serde(deserialize_with = "convert_uppercase")]
pub currency: enums::Currency,
pub customer: String,
#[serde(rename = "amount_remaining")]
pub amount: common_utils::types::MinorUnit,
pub charge: Stri... | crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs | hyperswitch_connectors | struct_definition | 117 | rust | StripebillingWebhookObject | null | null | null | null | null | null | null | null | null | null | null |
pub async fn authentication_eligibility(
state: web::Data<app::AppState>,
req: HttpRequest,
json_payload: web::Json<AuthenticationEligibilityRequest>,
path: web::Path<common_utils::id_type::AuthenticationId>,
) -> impl Responder {
let flow = Flow::AuthenticationEligibility;
let api_auth = auth:... | crates/router/src/routes/authentication.rs | router | function_signature | 284 | rust | null | null | null | null | authentication_eligibility | null | null | null | null | null | null | null |
impl Responder {
use hyperswitch_domain_models::payments::PaymentConfirmData;
let flow = Flow::PaymentsConfirmIntent;
// TODO: Populate browser information into the payload
// if let Err(err) = helpers::populate_ip_into_browser_info(&req, &mut payload) {
// return api::log_and_return_error_res... | crates/router/src/routes/payments.rs | router | impl_block | 472 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub trait PaymentInitiationRecipientCreate:
super::ConnectorIntegration<RecipientCreate, RecipientCreateRequest, RecipientCreateResponse>
{
} | crates/pm_auth/src/types/api/auth_service.rs | pm_auth | trait_definition | 29 | rust | null | null | PaymentInitiationRecipientCreate | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Ebanx {} | crates/hyperswitch_connectors/src/connectors/ebanx.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Ebanx | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Ebanx | null | null | null | null | null | null | null | null |
impl RefundExecute for Cybersource {} | crates/hyperswitch_connectors/src/connectors/cybersource.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Cybersource | RefundExecute for | impl RefundExecute for for Cybersource | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.UpiCollectData
{
"type": "object",
"properties": {
"vpa_id": {
"type": "string",
"example": "successtest@iata",
"nullable": true
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 64 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"UpiCollectData"
] | null | null | null | null |
pub struct AciRouterData<T> {
amount: StringMajorUnit,
router_data: T,
} | crates/hyperswitch_connectors/src/connectors/aci/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | AciRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub struct CustomerResponseObject {
customer_id: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | CustomerResponseObject | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update(
self,
conn: &PgPooledConn,
payment_intent: payment_intent::PaymentIntentUpdate,
) -> StorageResult<Self> {
match generics::generic_update_with_results::<<Self as HasTable>::Table, _, _, _>(
conn,
dsl::payment_id
.eq(self.pa... | crates/diesel_models/src/query/payment_intent.rs | diesel_models | function_signature | 181 | rust | null | null | null | null | update | null | null | null | null | null | null | null |
pub fn get_dir_country_dir_value(c: api_enums::Country) -> dir::enums::Country {
match c {
api_enums::Country::Afghanistan => dir::enums::Country::Afghanistan,
api_enums::Country::AlandIslands => dir::enums::Country::AlandIslands,
api_enums::Country::Albania => dir::enums::Country::Albania,
... | crates/kgraph_utils/src/transformers.rs | kgraph_utils | function_signature | 5,424 | rust | null | null | null | null | get_dir_country_dir_value | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.RetryFeatureData
{
"type": "object",
"description": "Represents the data associated with a retry feature in GSM.",
"required": [
"step_up_possible",
"clear_pan_possible",
"alternate_network_possible",
"decision"
],
"properties": {
"step_up_possible": ... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 185 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"RetryFeatureData"
] | null | null | null | null |
pub struct FiuuPaymentCancelRequest {
#[serde(rename = "txnID")]
txn_id: String,
domain: String,
skey: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | FiuuPaymentCancelRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct FiservInteractions {
channel: FiservChannel,
customer_confirmation: FiservCustomerConfirmation,
payment_initiator: FiservPaymentInitiator,
return_urls: FiservReturnUrls,
} | crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs | hyperswitch_connectors | struct_definition | 49 | rust | FiservInteractions | null | null | null | null | null | null | null | null | null | null | null |
pub const fn new() -> &'static Self {
&Self {
amount_converter: &MinorUnitForConnector,
amount_converter_webhooks: &StringMinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/adyen.rs | hyperswitch_connectors | function_signature | 41 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct OrderFulfilmentResponse {
id: String,
} | crates/hyperswitch_connectors/src/connectors/riskified/transformers/api.rs | hyperswitch_connectors | struct_definition | 15 | rust | OrderFulfilmentResponse | null | null | null | null | null | null | null | null | null | null | null |
/// Create a new Masked data
pub fn new_masked(item: Secret<T>) -> Self {
Self::Masked(item)
} | crates/masking/src/maskable.rs | masking | function_signature | 31 | rust | null | null | null | null | new_masked | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.ContractBasedRoutingConfig
{
"type": "object",
"properties": {
"config": {
"allOf": [
{
"$ref": "#/components/schemas/ContractBasedRoutingConfigBody"
}
],
"nullable": true
},
"label_info": {
"type": "array",
"... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 111 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ContractBasedRoutingConfig"
] | null | null | null | null |
pub struct InputData {
username: String,
password: String,
dbname: String,
host: String,
port: u16,
} | crates/hsdev/src/input_file.rs | hsdev | struct_definition | 33 | rust | InputData | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuthenticationDetails {
pub cryptogram: Secret<String>,
pub token: CardNumber, //network token
} | crates/router/src/types/payment_methods.rs | router | struct_definition | 25 | rust | AuthenticationDetails | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/sdk_events/accumulator.rs
Public functions: 1
Public structs: 3
use api_models::analytics::sdk_events::SdkEventMetricsBucketValue;
use router_env::logger;
use super::metrics::SdkEventMetricRow;
#[derive(Debug, Default)]
pub struct SdkEventMetricsAccumulator {
pub payment_attempts: Co... | crates/analytics/src/sdk_events/accumulator.rs | analytics | full_file | 747 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Fiserv {} | crates/hyperswitch_connectors/src/connectors/fiserv.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Fiserv | api::PaymentSync for | impl api::PaymentSync for for Fiserv | null | null | null | null | null | null | null | null |
pub struct RevenueRecoveryInvoiceData {
/// invoice amount at billing connector
pub amount: util_types::MinorUnit,
/// currency of the amount.
pub currency: common_enums::Currency,
/// merchant reference id at billing connector. ex: invoice_id
pub merchant_reference_id: id_type::PaymentReference... | crates/hyperswitch_domain_models/src/revenue_recovery.rs | hyperswitch_domain_models | struct_definition | 154 | rust | RevenueRecoveryInvoiceData | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentsApproveData {
pub amount: Option<i64>,
pub currency: Option<storage_enums::Currency>,
} | crates/hyperswitch_domain_models/src/router_request_types.rs | hyperswitch_domain_models | struct_definition | 29 | rust | PaymentsApproveData | null | null | null | null | null | null | null | null | null | null | null |
pub struct ClientRiskInformationRules {
name: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | ClientRiskInformationRules | null | null | null | null | null | null | null | null | null | null | null |
pub struct MagicLink {
pub recipient_email: domain::UserEmail,
pub user_name: domain::UserName,
pub settings: std::sync::Arc<configs::Settings>,
pub auth_id: Option<String>,
pub theme_id: Option<String>,
pub theme_config: EmailThemeConfig,
} | crates/router/src/services/email/types.rs | router | struct_definition | 64 | rust | MagicLink | null | null | null | null | null | null | null | null | null | null | null |
impl Cache {
pub fn server(state: AppState) -> Scope {
web::scope("/cache")
.app_data(web::Data::new(state))
.service(web::resource("/invalidate/{key}").route(web::post().to(invalidate)))
}
} | crates/router/src/routes/app.rs | router | impl_block | 56 | rust | null | Cache | null | impl Cache | null | null | null | null | null | null | null | null |
pub async fn set_eligible_connector_for_nti_in_payment_data<F, D>(
state: &SessionState,
business_profile: &domain::Profile,
key_store: &domain::MerchantKeyStore,
payment_data: &mut D,
connector_choice: api::ConnectorChoice,
) -> RouterResult<api::ConnectorData>
where
F: Send + Clone,
D: Ope... | crates/router/src/core/payments.rs | router | function_signature | 438 | rust | null | null | null | null | set_eligible_connector_for_nti_in_payment_data | null | null | null | null | null | null | null |
impl Gpayments {
pub fn new() -> &'static Self {
&Self {
_amount_converter: &MinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/gpayments.rs | hyperswitch_connectors | impl_block | 34 | rust | null | Gpayments | null | impl Gpayments | null | null | null | null | null | null | null | null |
/// Get when the customer acceptance was provided
pub fn get_accepted_at(&self) -> PrimitiveDateTime {
self.accepted_at.unwrap_or_else(date_time::now)
} | crates/common_types/src/payments.rs | common_types | function_signature | 37 | rust | null | null | null | null | get_accepted_at | null | null | null | null | null | null | null |
impl Responder {
let flow = AnalyticsFlow::GetSankey;
let payload = json_payload.into_inner();
Box::pin(api::server_wrap(
flow,
state,
&req,
payload,
|state, auth: AuthenticationData, req, _| async move {
let org_id = au... | crates/router/src/analytics.rs | router | impl_block | 205 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub async fn list_updatable_roles_at_entity_level(
state: web::Data<AppState>,
req: HttpRequest,
query: web::Query<role_api::ListRolesAtEntityLevelRequest>,
) -> HttpResponse {
let flow = Flow::ListUpdatableRolesAtEntityLevel;
Box::pin(api::server_wrap(
flow,
state.clone(),
... | crates/router/src/routes/user_role.rs | router | function_signature | 169 | rust | null | null | null | null | list_updatable_roles_at_entity_level | null | null | null | null | null | null | null |
pub async fn find_by_merchant_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<
<Self as HasTable>::Table,
_,
<<Self as HasTable>::Table as Table>::PrimaryKey,
... | crates/diesel_models/src/query/payment_method.rs | diesel_models | function_signature | 112 | rust | null | null | null | null | find_by_merchant_id | null | null | null | null | null | null | null |
pub struct SecretBytesMut(BytesMut); | crates/masking/src/bytes.rs | masking | struct_definition | 8 | rust | SecretBytesMut | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentMetricsBucketValue {
pub payment_success_rate: Option<f64>,
pub payment_count: Option<u64>,
pub payment_success_count: Option<u64>,
pub payment_processed_amount: Option<u64>,
pub payment_processed_amount_in_usd: Option<u64>,
pub payment_processed_count: Option<u64>,
pub pay... | crates/api_models/src/analytics/payments.rs | api_models | struct_definition | 332 | rust | PaymentMetricsBucketValue | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Nuvei {} | crates/hyperswitch_connectors/src/connectors/nuvei.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Nuvei | api::RefundSync for | impl api::RefundSync for for Nuvei | null | null | null | null | null | null | null | null |
pub async fn delete_totp_attempts_from_redis(
state: &SessionState,
user_id: &str,
) -> UserResult<()> {
let redis_conn = super::get_redis_connection_for_global_tenant(state)?;
redis_conn
.delete_key(&get_totp_attempts_key(user_id).into())
.await
.change_context(UserErrors::Inter... | crates/router/src/utils/user/two_factor_auth.rs | router | function_signature | 85 | rust | null | null | null | null | delete_totp_attempts_from_redis | null | null | null | null | null | null | null |
File: crates/common_enums/src/transformers.rs
Public functions: 10
Public structs: 1
use std::fmt::{Display, Formatter};
use serde::{Deserialize, Serialize};
#[cfg(feature = "payouts")]
use crate::enums::PayoutStatus;
use crate::enums::{
AttemptStatus, Country, CountryAlpha2, CountryAlpha3, DisputeStatus, Even... | crates/common_enums/src/transformers.rs#chunk0 | common_enums | chunk | 8,187 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct XenditMultipleSplitResponse {
/// Identifier for split rule created for the payment
pub split_rule_id: String,
/// The sub-account user-id that you want to make this transaction for.
pub for_user_id: Option<String>,
/// Name to identify split rule. Not required to be unique. Typically bas... | crates/common_types/src/payments.rs | common_types | struct_definition | 130 | rust | XenditMultipleSplitResponse | null | null | null | null | null | null | null | null | null | null | null |
impl TryFrom<&types::RefundSyncRouterData> for BraintreeRSyncRequest {
type Error = error_stack::Report<errors::ConnectorError>;
fn try_from(item: &types::RefundSyncRouterData) -> Result<Self, Self::Error> {
let metadata: BraintreeMeta = if let (
Some(merchant_account_id),
Some(m... | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs#chunk1 | hyperswitch_connectors | chunk | 7,246 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/euclid/src/frontend/vir.rs
Public structs: 4
//! Valued Intermediate Representation
use serde::{Deserialize, Serialize};
use crate::types::{EuclidValue, Metadata};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum ValuedComparisonLogic {
NegativeConjunction,
PositiveDisjunction,
}
#[der... | crates/euclid/src/frontend/vir.rs | euclid | full_file | 250 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Boku {} | crates/hyperswitch_connectors/src/connectors/boku.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Boku | api::RefundSync for | impl api::RefundSync for for Boku | null | null | null | null | null | null | null | null |
pub struct MandateResponseBody {
return_value: u8,
token: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | MandateResponseBody | null | null | null | null | null | null | null | null | null | null | null |
pub struct NmiAuthType {
pub(super) api_key: Secret<String>,
pub(super) public_key: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs | hyperswitch_connectors | struct_definition | 30 | rust | NmiAuthType | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/services/kafka/revenue_recovery.rs
Public structs: 1
use common_utils::{id_type, types::MinorUnit};
use masking::Secret;
use time::OffsetDateTime;
#[derive(serde::Serialize, Debug)]
pub struct RevenueRecovery<'a> {
pub merchant_id: &'a id_type::MerchantId,
pub invoice_amount: MinorUnit... | crates/router/src/services/kafka/revenue_recovery.rs | router | full_file | 460 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentCapture for Worldline {} | crates/hyperswitch_connectors/src/connectors/worldline.rs | hyperswitch_connectors | impl_block | 7 | rust | null | Worldline | PaymentCapture for | impl PaymentCapture for for Worldline | null | null | null | null | null | null | null | null |
pub async fn insert_totp_attempts_in_redis(
state: &SessionState,
user_id: &str,
user_totp_attempts: u8,
) -> UserResult<()> {
let redis_conn = super::get_redis_connection_for_global_tenant(state)?;
redis_conn
.set_key_with_expiry(
&get_totp_attempts_key(user_id).into(),
... | crates/router/src/utils/user/two_factor_auth.rs | router | function_signature | 117 | rust | null | null | null | null | insert_totp_attempts_in_redis | null | null | null | null | null | null | null |
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<ReverseLookup> {
generics::generic_insert(conn, self).await
} | crates/diesel_models/src/query/reverse_lookup.rs | diesel_models | function_signature | 35 | rust | null | null | null | null | insert | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::SessionUpdateTaxCalculation;
let payment_id = path.into_inner();
let payload = payment_types::PaymentsDynamicTaxCalculationRequest {
payment_id,
..json_payload.into_inner()
};
let header_payload = match HeaderPayload::foreign_try_from(req.headers()) ... | crates/router/src/routes/payments.rs | router | impl_block | 331 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl api::Payment for Bitpay {} | crates/hyperswitch_connectors/src/connectors/bitpay.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Bitpay | api::Payment for | impl api::Payment for for Bitpay | null | null | null | null | null | null | null | null |
pub struct Item {
pub display_name: String,
pub sku: String,
pub unit_price: MinorUnit,
pub qty: i64,
} | crates/hyperswitch_connectors/src/connectors/affirm/transformers.rs | hyperswitch_connectors | struct_definition | 34 | rust | Item | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundResponse {
action_id: String,
reference: String,
} | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | RefundResponse | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentIncrementalAuthorization for Stripe {} | crates/hyperswitch_connectors/src/connectors/stripe.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Stripe | PaymentIncrementalAuthorization for | impl PaymentIncrementalAuthorization for for Stripe | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Nexinets {} | crates/hyperswitch_connectors/src/connectors/nexinets.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Nexinets | api::MandateSetup for | impl api::MandateSetup for for Nexinets | null | null | null | null | null | null | null | null |
fn get_country(&self) -> Result<&api_models::enums::CountryAlpha2, Error>;
fn get_combined_address_line(&self) -> Result<Secret<String>, Error>;
fn get_optional_line2(&self) -> Option<Secret<String>>;
fn get_optional_country(&self) -> Option<api_models::enums::CountryAlpha2>;
}
impl AddressDetailsData ... | crates/router/src/connector/utils.rs#chunk2 | router | chunk | 8,187 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentMethodCreate {
pub fn validate_payment_method_data_against_payment_method(
payment_method_type: api_enums::PaymentMethod,
payment_method_data: PaymentMethodCreateData,
) -> bool {
match payment_method_type {
api_enums::PaymentMethod::Card => {
matc... | crates/api_models/src/payment_methods.rs | api_models | impl_block | 172 | rust | null | PaymentMethodCreate | null | impl PaymentMethodCreate | null | null | null | null | null | null | null | null |
pub struct PixBankTransferAdditionalData {
/// Partially masked unique key for pix transfer
#[schema(value_type = Option<String>, example = "a1f4102e ****** 6fa48899c1d1")]
pub pix_key: Option<MaskedBankAccount>,
/// Partially masked CPF - CPF is a Brazilian tax identification number
#[schema(value... | crates/api_models/src/payments/additional_info.rs | api_models | struct_definition | 389 | rust | PixBankTransferAdditionalData | null | null | null | null | null | null | null | null | null | null | null |
impl SellerStatusDetailsResponse {
pub fn check_payments_receivable(&self) -> Option<api::PayPalOnboardingStatus> {
if !self.payments_receivable {
return Some(api::PayPalOnboardingStatus::PaymentsNotReceivable);
}
None
}
pub fn check_ppcp_custom_status(&self) -> Option<a... | crates/router/src/types/api/connector_onboarding/paypal.rs | router | impl_block | 387 | rust | null | SellerStatusDetailsResponse | null | impl SellerStatusDetailsResponse | null | null | null | null | null | null | null | null |
pub struct Node<V: ValueNode> {
pub node_type: NodeType<V>,
pub preds: Vec<EdgeId>,
pub succs: Vec<EdgeId>,
} | crates/hyperswitch_constraint_graph/src/types.rs | hyperswitch_constraint_graph | struct_definition | 35 | rust | Node | null | null | null | null | null | null | null | null | null | null | null |
impl fmt::Display for LimitByClause {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "LIMIT {} BY {}", self.limit, self.columns.join(", "))
}
} | crates/analytics/src/query.rs | analytics | impl_block | 51 | rust | null | LimitByClause | fmt::Display for | impl fmt::Display for for LimitByClause | null | null | null | null | null | null | null | null |
pub struct CheckoutRequest {
id: String,
note: Option<String>,
email: Option<Email>,
#[serde(with = "common_utils::custom_serde::iso8601")]
created_at: PrimitiveDateTime,
currency: Option<Currency>,
#[serde(with = "common_utils::custom_serde::iso8601")]
updated_at: PrimitiveDateTime,
... | crates/hyperswitch_connectors/src/connectors/riskified/transformers/api.rs | hyperswitch_connectors | struct_definition | 207 | rust | CheckoutRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/fraud_check/operation.rs
pub mod fraud_check_post;
pub mod fraud_check_pre;
use async_trait::async_trait;
use common_enums::FrmSuggestion;
use error_stack::{report, ResultExt};
pub use self::{fraud_check_post::FraudCheckPost, fraud_check_pre::FraudCheckPre};
use super::{
types::{Conne... | crates/router/src/core/fraud_check/operation.rs | router | full_file | 888 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn add_select_column(&mut self, column: impl ToSql<T>) -> QueryResult<()> {
self.columns.push(
column
.to_sql(&self.table_engine)
.change_context(QueryBuildingError::SqlSerializeError)
.attach_printable("Error serializing select column")?,
... | crates/analytics/src/query.rs | analytics | function_signature | 70 | rust | null | null | null | null | add_select_column | null | null | null | null | null | null | null |
pub struct GpaymentsPreAuthVersionCallResponse {
pub enrolment_status: EnrollmentStatus,
pub supported_message_versions: Option<Vec<types::SemanticVersion>>,
} | crates/hyperswitch_connectors/src/connectors/gpayments/gpayments_types.rs | hyperswitch_connectors | struct_definition | 34 | rust | GpaymentsPreAuthVersionCallResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Xendit {} | crates/hyperswitch_connectors/src/connectors/xendit.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Xendit | api::PaymentSync for | impl api::PaymentSync for for Xendit | null | null | null | null | null | null | null | null |
pub struct ProfileUpdateInternal {
pub profile_name: Option<String>,
pub modified_at: time::PrimitiveDateTime,
pub return_url: Option<common_utils::types::Url>,
pub enable_payment_response_hash: Option<bool>,
pub payment_response_hash_key: Option<String>,
pub redirect_to_merchant_with_http_post:... | crates/diesel_models/src/business_profile.rs | diesel_models | struct_definition | 718 | rust | ProfileUpdateInternal | null | null | null | null | null | null | null | null | null | null | null |
pub struct Browser {
pub javascript_enabled: Option<bool>,
pub java_enabled: Option<bool>,
pub cookies_enabled: Option<bool>,
pub language: Option<String>,
pub screen_color_depth: Option<i32>,
pub screen_height: Option<i32>,
pub screen_width: Option<i32>,
pub time_zone: Option<i32>,
... | crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs | hyperswitch_connectors | struct_definition | 92 | rust | Browser | null | null | null | null | null | null | null | null | null | null | null |
pub async fn generate_fingerprint(
state: &routes::SessionState,
card_number: StrongSecret<String>,
hash_key: StrongSecret<String>,
locker_choice: api_enums::LockerChoice,
) -> CustomResult<blocklist::GenerateFingerprintResponsePayload, errors::VaultError> {
let payload = blocklist::GenerateFingerpr... | crates/router/src/core/blocklist/transformers.rs | router | function_signature | 126 | rust | null | null | null | null | generate_fingerprint | null | null | null | null | null | null | null |
impl api::RefundSync for Taxjar {} | crates/hyperswitch_connectors/src/connectors/taxjar.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Taxjar | api::RefundSync for | impl api::RefundSync for for Taxjar | null | null | null | null | null | null | null | null |
pub struct AuthorizedotnetCustomerResponse {
customer_profile_id: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
customer_payment_profile_id_list: Vec<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
customer_shipping_address_id_list: Vec<String>,
pub m... | crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs | hyperswitch_connectors | struct_definition | 76 | rust | AuthorizedotnetCustomerResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Nexinets {} | crates/hyperswitch_connectors/src/connectors/nexinets.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Nexinets | api::RefundSync for | impl api::RefundSync for for Nexinets | null | null | null | null | null | null | null | null |
pub async fn decrypt_and_get_totp_secret(
&self,
state: &SessionState,
) -> UserResult<Option<Secret<String>>> {
if self.0.totp_secret.is_none() {
return Ok(None);
}
let key_manager_state = &state.into();
let user_key_store = state
.global_stor... | crates/router/src/types/domain/user.rs | router | function_signature | 226 | rust | null | null | null | null | decrypt_and_get_totp_secret | null | null | null | null | null | null | null |
impl super::refunds::distribution::RefundDistributionAnalytics for ClickhouseClient {} | crates/analytics/src/clickhouse.rs | analytics | impl_block | 17 | rust | null | ClickhouseClient | super::refunds::distribution::RefundDistributionAnalytics for | impl super::refunds::distribution::RefundDistributionAnalytics for for ClickhouseClient | null | null | null | null | null | null | null | null |
pub struct NexinetsCaptureOrVoidRequest {
pub initial_amount: i64,
pub currency: enums::Currency,
} | crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | NexinetsCaptureOrVoidRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct MaskedHeaders(HashMap<String, String>); | crates/api_models/src/admin.rs | api_models | struct_definition | 12 | rust | MaskedHeaders | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Bitpay {} | crates/hyperswitch_connectors/src/connectors/bitpay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Bitpay | api::RefundSync for | impl api::RefundSync for for Bitpay | null | null | null | null | null | null | null | null |
pub struct DrainerHealthCheckResponse {
pub database: bool,
pub redis: bool,
} | crates/drainer/src/health_check.rs | drainer | struct_definition | 21 | rust | DrainerHealthCheckResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_total_surcharge_amount(&self) -> Option<MinorUnit> {
self.surcharge_amount
.map(|surcharge_amount| surcharge_amount + self.tax_on_surcharge.unwrap_or_default())
} | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | function_signature | 47 | rust | null | null | null | null | get_total_surcharge_amount | null | null | null | null | null | null | null |
pub struct EbanxPayoutCancelRequest {
integration_key: Secret<String>,
uid: String,
} | crates/hyperswitch_connectors/src/connectors/ebanx/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | EbanxPayoutCancelRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/types/storage/callback_mapper.rs
pub use diesel_models::callback_mapper::CallbackMapper;
| crates/router/src/types/storage/callback_mapper.rs | router | full_file | 22 | 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.