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 form_payments_info(
payment_intent: PaymentIntent,
merchant_context: &domain::MerchantContext,
profile: domain::Profile,
db: &dyn StorageInterface,
key_manager_state: &util_types::keymanager::KeyManagerState,
) -> RouterResult<Self> {
let collect_cvv_duri... | crates/router/src/core/payment_methods.rs | router | function_signature | 171 | rust | null | null | null | null | form_payments_info | null | null | null | null | null | null | null |
File: crates/diesel_models/src/address.rs
Public functions: 1
Public structs: 4
use common_utils::{crypto, encryption::Encryption};
use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
use serde::{Deserialize, Serialize};
use time::PrimitiveDateTime;
use crate::{enums, schema::address};
#[de... | crates/diesel_models/src/address.rs | diesel_models | full_file | 980 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn clone_connector(
state: SessionState,
request: user_api::CloneConnectorRequest,
) -> UserResponse<api_models::admin::MerchantConnectorResponse> {
let Some(allowlist) = &state.conf.clone_connector_allowlist else {
return Err(UserErrors::InvalidCloneConnectorOperation(
"Clonin... | crates/router/src/core/user.rs | router | function_signature | 748 | rust | null | null | null | null | clone_connector | null | null | null | null | null | null | null |
pub struct RefundLink {
payment: String,
} | crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs | hyperswitch_connectors | struct_definition | 12 | rust | RefundLink | null | null | null | null | null | null | null | null | null | null | null |
impl api::Refund for Breadpay {} | crates/hyperswitch_connectors/src/connectors/breadpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Breadpay | api::Refund for | impl api::Refund for for Breadpay | null | null | null | null | null | null | null | null |
impl<const T: u8> MandateSetup for DummyConnector<T> {} | crates/hyperswitch_connectors/src/connectors/dummyconnector.rs | hyperswitch_connectors | impl_block | 16 | rust | null | DummyConnector | MandateSetup for | impl MandateSetup for for DummyConnector | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Tokenio {} | crates/hyperswitch_connectors/src/connectors/tokenio.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Tokenio | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Tokenio | null | null | null | null | null | null | null | null |
impl api::UasPreAuthenticationV2 for Recurly {} | crates/hyperswitch_connectors/src/connectors/recurly.rs | hyperswitch_connectors | impl_block | 14 | rust | null | Recurly | api::UasPreAuthenticationV2 for | impl api::UasPreAuthenticationV2 for for Recurly | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Trustpayments {
fn id(&self) -> &'static str {
"trustpayments"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
// todo!()
api::CurrencyUnit::Minor
// TODO! Check connector documentation, on which unit they are processing the currency.
... | crates/hyperswitch_connectors/src/connectors/trustpayments.rs | hyperswitch_connectors | impl_block | 466 | rust | null | Trustpayments | ConnectorCommon for | impl ConnectorCommon for for Trustpayments | null | null | null | null | null | null | null | null |
pub async fn find_by_id(
conn: &PgPooledConn,
id: &common_utils::id_type::MerchantConnectorAccountId,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
dsl::id.eq(id.to_owned()),
)
.await
} | crates/diesel_models/src/query/merchant_connector_account.rs | diesel_models | function_signature | 77 | rust | null | null | null | null | find_by_id | null | null | null | null | null | null | null |
pub struct BarclaycardErrorInformationResponse {
id: String,
error_information: BarclaycardErrorInformation,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | BarclaycardErrorInformationResponse | null | null | null | null | null | null | null | null | null | null | null |
/// Service name deduced from name of the binary.
/// This macro must be called within binaries only.
///
/// Example: `router`.
#[macro_export]
macro_rules! service_name {
() => {
env!("CARGO_BIN_NAME")
};
} | crates/router_env/src/env.rs | router_env | macro | 54 | rust | null | null | null | null | null | null | null | null | declarative | null | null | null |
pub fn get_message(&self) -> String {
match self {
Self::Json {
message,
error_code,
} => message
.as_deref()
.or(error_code.as_deref())
.unwrap_or(NO_ERROR_MESSAGE)
.to_string(),
... | crates/hyperswitch_connectors/src/connectors/tokenio/transformers.rs | hyperswitch_connectors | function_signature | 73 | rust | null | null | null | null | get_message | null | null | null | null | null | null | null |
pub async fn delete_user_theme(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<String>,
) -> HttpResponse {
let flow = Flow::DeleteUserTheme;
let theme_id = path.into_inner();
Box::pin(api::server_wrap(
flow,
state,
&req,
theme_id,
|state, ... | crates/router/src/routes/user/theme.rs | router | function_signature | 145 | rust | null | null | null | null | delete_user_theme | null | null | null | null | null | null | null |
pub struct GooglePayTokenizedCard {
transaction_type: TransactionType,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | GooglePayTokenizedCard | null | null | null | null | null | null | null | null | null | null | null |
pub struct VoltAuthUpdateRequest {
grant_type: String,
client_id: Secret<String>,
client_secret: Secret<String>,
username: Secret<String>,
password: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/volt/transformers.rs | hyperswitch_connectors | struct_definition | 40 | rust | VoltAuthUpdateRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct Airwallex {
amount_converter: &'static (dyn AmountConvertor<Output = StringMajorUnit> + Sync),
amount_converter_to_string_minor:
&'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/airwallex.rs | hyperswitch_connectors | struct_definition | 53 | rust | Airwallex | null | null | null | null | null | null | null | null | null | null | null |
pub fn is_vault_sdk_enabled(&self) -> bool {
self.external_vault_connector_details.is_some()
} | crates/hyperswitch_domain_models/src/business_profile.rs | hyperswitch_domain_models | function_signature | 25 | rust | null | null | null | null | is_vault_sdk_enabled | null | null | null | null | null | null | null |
pub struct ErrorResult {
pub reason: String,
pub count: i64,
pub percentage: f64,
} | crates/api_models/src/analytics/payments.rs | api_models | struct_definition | 28 | rust | ErrorResult | null | null | null | null | null | null | null | null | null | null | null |
impl api::Refund for Trustpay {} | crates/hyperswitch_connectors/src/connectors/trustpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Trustpay | api::Refund for | impl api::Refund for for Trustpay | null | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Paysafe {
fn get_webhook_object_reference_id(
&self,
_request: &webhooks::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
Err(report!(errors::ConnectorError::WebhooksNotImplemented)... | crates/hyperswitch_connectors/src/connectors/paysafe.rs | hyperswitch_connectors | impl_block | 210 | rust | null | Paysafe | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Paysafe | null | null | null | null | null | null | null | null |
pub async fn get_all_user_key_stores(
conn: &PgPooledConn,
from: u32,
limit: u32,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<
<Self as HasTable>::Table,
_,
<<Self as HasTable>::Table as diesel::Table>::PrimaryKey,
_,
... | crates/diesel_models/src/query/user_key_store.rs | diesel_models | function_signature | 122 | rust | null | null | null | null | get_all_user_key_stores | null | null | null | null | null | null | null |
impl Payouts {
pub async fn update(
self,
conn: &PgPooledConn,
payout_update: PayoutsUpdate,
) -> StorageResult<Self> {
match generics::generic_update_with_results::<<Self as HasTable>::Table, _, _, _>(
conn,
dsl::payout_id
.eq(self.payout_... | crates/diesel_models/src/query/payouts.rs | diesel_models | impl_block | 994 | rust | null | Payouts | null | impl Payouts | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.ProfileAcquirerResponse
{
"type": "object",
"required": [
"profile_acquirer_id",
"acquirer_assigned_merchant_id",
"merchant_name",
"network",
"acquirer_bin",
"acquirer_fraud_rate",
"profile_id"
],
"properties": {
"profile_acquirer_id": {
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 439 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ProfileAcquirerResponse"
] | null | null | null | null |
pub struct TokenRetryInfo {
pub monthly_wait_hours: i64, // Hours to wait for 30-day limit reset
pub daily_wait_hours: i64, // Hours to wait for daily limit reset
pub total_30_day_retries: i32, // Current total retry count in 30-day window
} | crates/router/src/types/storage/revenue_recovery_redis_operation.rs | router | struct_definition | 76 | rust | TokenRetryInfo | null | null | null | null | null | null | null | null | null | null | null |
pub async fn list_orgs_for_user(state: web::Data<AppState>, req: HttpRequest) -> HttpResponse {
let flow = Flow::ListOrgForUser;
Box::pin(api::server_wrap(
flow,
state.clone(),
&req,
(),
|state, user_from_token, _, _| user_core::list_orgs_for_user(state, user_from_token)... | crates/router/src/routes/user.rs | router | function_signature | 108 | rust | null | null | null | null | list_orgs_for_user | null | null | null | null | null | null | null |
impl<T> std::ops::Deref for EncryptedJsonType<T> {
type Target = T;
fn deref(&self) -> &Self::Target {
self.inner()
}
} | crates/hyperswitch_domain_models/src/type_encryption.rs | hyperswitch_domain_models | impl_block | 43 | rust | null | EncryptedJsonType | std::ops::Deref for | impl std::ops::Deref for for EncryptedJsonType | null | null | null | null | null | null | null | null |
pub struct PaymentExperienceTypes {
/// The payment experience enabled
#[schema(value_type = Option<PaymentExperience>, example = "redirect_to_url")]
pub payment_experience_type: api_enums::PaymentExperience,
/// The list of eligible connectors for a given payment experience
#[schema(example = json... | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 82 | rust | PaymentExperienceTypes | null | null | null | null | null | null | null | null | null | null | null |
}
fn get_order_details(&self) -> Result<Vec<OrderDetailsWithAmount>, Error> {
self.order_details
.clone()
.ok_or_else(missing_field_err("order_details"))
}
fn get_card(&self) -> Result<domain::Card, Error> {
match self.payment_method_data.clone() {
do... | crates/router/src/connector/utils.rs#chunk1 | router | chunk | 8,182 | null | null | 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.enabled && self.hyperswitch_ai_host.is_empty(), || {
Err(ApplicationError::InvalidConfigurationValueError(
"hyperswitch ai host must be set if chat is enabled".into(),
... | crates/router/src/configs/validations.rs | router | function_signature | 73 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
impl api::PaymentSync for Inespay {} | crates/hyperswitch_connectors/src/connectors/inespay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Inespay | api::PaymentSync for | impl api::PaymentSync for for Inespay | null | null | null | null | null | null | null | null |
pub async fn transfer_key_store_to_key_manager(
state: SessionState,
req: admin_types::MerchantKeyTransferRequest,
) -> RouterResponse<admin_types::TransferKeyResponse> {
let resp = transfer_encryption_key(&state, req).await?;
Ok(service_api::ApplicationResponse::Json(
admin_types::TransferKeyR... | crates/router/src/core/admin.rs | router | function_signature | 85 | rust | null | null | null | null | transfer_key_store_to_key_manager | null | null | null | null | null | null | null |
pub async fn mk_get_card_request_hs(
jwekey: &settings::Jwekey,
locker: &settings::Locker,
customer_id: &id_type::CustomerId,
merchant_id: &id_type::MerchantId,
card_reference: &str,
locker_choice: Option<api_enums::LockerChoice>,
tenant_id: id_type::TenantId,
request_id: Option<RequestI... | crates/router/src/core/payment_methods/transformers.rs | router | function_signature | 450 | rust | null | null | null | null | mk_get_card_request_hs | null | null | null | null | null | null | null |
impl GlobalPaymentId {
/// Get string representation of the id
pub fn get_string_repr(&self) -> &str {
self.0.get_string_repr()
}
/// Generate a new GlobalPaymentId from a cell id
pub fn generate(cell_id: &crate::id_type::CellId) -> Self {
let global_id = super::GlobalId::generate(c... | crates/common_utils/src/id_type/global_id/payment.rs | common_utils | impl_block | 159 | rust | null | GlobalPaymentId | null | impl GlobalPaymentId | null | null | null | null | null | null | null | null |
pub struct AuthenticationResponse {
/// The unique identifier for this authentication.
#[schema(value_type = String, example = "auth_mbabizu24mvu3mela5njyhpit4")]
pub authentication_id: id_type::AuthenticationId,
/// This is an identifier for the merchant account. This is inferred from the API key
... | crates/api_models/src/authentication.rs | api_models | struct_definition | 652 | rust | AuthenticationResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct SquareTokenizeData {
client_id: Secret<String>,
session_id: Secret<String>,
card_data: SquareCardData,
} | crates/hyperswitch_connectors/src/connectors/square/transformers.rs | hyperswitch_connectors | struct_definition | 30 | rust | SquareTokenizeData | null | null | null | null | null | null | null | null | null | null | null |
pub struct DummyConnectorPaymentCompleteBody {
pub confirm: bool,
} | crates/router/src/routes/dummy_connector/types.rs | router | struct_definition | 15 | rust | DummyConnectorPaymentCompleteBody | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/frm/metrics/frm_blocked_rate.rs
use api_models::analytics::{
frm::{FrmDimensions, FrmFilters, FrmMetricsBucketIdentifier},
Granularity, TimeRange,
};
use common_utils::errors::ReportSwitchExt;
use error_stack::ResultExt;
use time::PrimitiveDateTime;
use super::FrmMetricRow;
use crat... | crates/analytics/src/frm/metrics/frm_blocked_rate.rs | analytics | full_file | 831 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn generate_org_dispute_report(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<ReportRequest>,
) -> impl Responder {
let flow = AnalyticsFlow::GenerateDisputeReport;
Box::pin(api::server_wrap(
flow,
state.clo... | crates/router/src/analytics.rs | router | function_signature | 341 | rust | null | null | null | null | generate_org_dispute_report | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/dlocal.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use api_models::webhooks::IncomingWebhookEvent;
use common_enums::enums;
use common_utils::{
crypto::{self, SignMessage},
date_time,
errors::CustomResult,
ext_traits::ByteSliceExt... | crates/hyperswitch_connectors/src/connectors/dlocal.rs | hyperswitch_connectors | full_file | 5,877 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ErrorResponse {
pub fn get_not_implemented() -> Self {
Self {
code: "IR_00".to_string(),
message: "This API is under development and will be made available soon.".to_string(),
reason: None,
status_code: http::StatusCode::INTERNAL_SERVER_ERROR.as_u16(),
... | crates/hyperswitch_domain_models/src/router_data.rs | hyperswitch_domain_models | impl_block | 116 | rust | null | ErrorResponse | null | impl ErrorResponse | null | null | null | null | null | null | null | null |
pub struct LocalPrice {
pub amount: StringMajorUnit,
pub currency: String,
} | crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | LocalPrice | null | null | null | null | null | null | null | null | null | null | null |
pub struct AirwallexCard {
card: AirwallexCardDetails,
#[serde(rename = "type")]
payment_method_type: AirwallexPaymentType,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 36 | rust | AirwallexCard | null | null | null | null | null | null | null | null | null | null | null |
impl<'a> KafkaAuthentication<'a> {
pub fn from_storage(authentication: &'a Authentication) -> Self {
Self {
created_at: authentication.created_at.assume_utc(),
modified_at: authentication.modified_at.assume_utc(),
authentication_id: &authentication.authentication_id,
... | crates/router/src/services/kafka/authentication.rs | router | impl_block | 455 | rust | null | KafkaAuthentication | null | impl KafkaAuthentication | null | null | null | null | null | null | null | null |
pub struct IatapayAuthUpdateResponse {
pub access_token: Secret<String>,
pub expires_in: i64,
} | crates/hyperswitch_connectors/src/connectors/iatapay/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | IatapayAuthUpdateResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn new(password: Secret<String>) -> UserResult<Self> {
let password = password.expose();
let mut has_upper_case = false;
let mut has_lower_case = false;
let mut has_numeric_value = false;
let mut has_special_character = false;
let mut has_whitespace = false;
... | crates/router/src/types/domain/user.rs | router | function_signature | 262 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct CryptopayErrorResponse {
pub error: CryptopayErrorData,
} | crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | CryptopayErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_resolved_strength(prev_strength: Self, curr_strength: Self) -> Self {
std::cmp::max(prev_strength, curr_strength)
} | crates/hyperswitch_constraint_graph/src/types.rs | hyperswitch_constraint_graph | function_signature | 33 | rust | null | null | null | null | get_resolved_strength | null | null | null | null | null | null | null |
pub async fn refunds_update() {} | crates/openapi/src/routes/refunds.rs | openapi | function_signature | 7 | rust | null | null | null | null | refunds_update | null | null | null | null | null | null | null |
pub async fn list_by_organization_id(
conn: &PgPooledConn,
organization_id: &common_utils::id_type::OrganizationId,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<
<Self as HasTable>::Table,
_,
<<Self as HasTable>::Table as Table>::PrimaryKey,
... | crates/diesel_models/src/query/merchant_account.rs | diesel_models | function_signature | 111 | rust | null | null | null | null | list_by_organization_id | null | null | null | null | null | null | null |
pub async fn check_recovery_code_in_redis(state: &SessionState, user_id: &str) -> UserResult<bool> {
let redis_conn = super::get_redis_connection_for_global_tenant(state)?;
let key = format!("{}{}", consts::user::REDIS_RECOVERY_CODE_PREFIX, user_id);
redis_conn
.exists::<()>(&key.into())
.aw... | crates/router/src/utils/user/two_factor_auth.rs | router | function_signature | 90 | rust | null | null | null | null | check_recovery_code_in_redis | null | null | null | null | null | null | null |
pub struct NotificationContainer {
pub notification: Vec<Notification>,
pub format: NotificationFormat,
} | crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | NotificationContainer | null | null | null | null | null | null | null | null | null | null | null |
pub struct TenantLevel {
pub tenant_id: id_type::TenantId,
} | crates/router/src/types/domain/user.rs | router | struct_definition | 17 | rust | TenantLevel | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Bankofamerica {} | crates/hyperswitch_connectors/src/connectors/bankofamerica.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Bankofamerica | api::PaymentSync for | impl api::PaymentSync for for Bankofamerica | null | null | null | null | null | null | null | null |
pub async fn find_optional_by_merchant_reference_id_merchant_id(
conn: &PgPooledConn,
merchant_reference_id: &str,
merchant_id: &common_utils::id_type::MerchantId,
) -> StorageResult<Option<Self>> {
generics::generic_find_one_optional::<<Self as HasTable>::Table, _, _>(
c... | crates/diesel_models/src/query/payment_intent.rs | diesel_models | function_signature | 117 | rust | null | null | null | null | find_optional_by_merchant_reference_id_merchant_id | null | null | null | null | null | null | null |
pub struct Address {
pub street_and_number: Secret<String>,
pub postal_code: Secret<String>,
pub city: String,
pub region: Option<Secret<String>>,
pub country: api_models::enums::CountryAlpha2,
} | crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs | hyperswitch_connectors | struct_definition | 50 | rust | Address | null | null | null | null | null | null | null | null | null | null | null |
pub struct WellsfargoAuthenticationErrorResponse {
pub response: AuthenticationErrorInformation,
} | crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | WellsfargoAuthenticationErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/phonepe/transformers.rs
Public structs: 8
use common_enums::enums;
use common_utils::types::StringMinorUnit;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, RouterData},
router_flow_types::refunds:... | crates/hyperswitch_connectors/src/connectors/phonepe/transformers.rs | hyperswitch_connectors | full_file | 1,710 | null | null | null | null | null | null | null | null | null | null | null | null | null |
Err(get_error_response(
&item.response.error_information,
&None,
None,
item.http_code,
item.response.id.clone(),
))
... | crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs#chunk2 | hyperswitch_connectors | chunk | 1,245 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ApiEventMetric for FrmFilterValue {} | crates/api_models/src/analytics.rs | api_models | impl_block | 9 | rust | null | FrmFilterValue | ApiEventMetric for | impl ApiEventMetric for for FrmFilterValue | null | null | null | null | null | null | null | null |
pub async fn get_user_from_db_by_email(
state: &SessionState,
email: domain::UserEmail,
) -> CustomResult<UserFromStorage, StorageError> {
state
.global_store
.find_user_by_email(&email)
.await
.map(UserFromStorage::from)
} | crates/router/src/utils/user.rs | router | function_signature | 68 | rust | null | null | null | null | get_user_from_db_by_email | null | null | null | null | null | null | null |
pub struct ProcessingInformation {
action_list: Option<Vec<CybersourceActionsList>>,
action_token_types: Option<Vec<CybersourceActionsTokenType>>,
authorization_options: Option<CybersourceAuthorizationOptions>,
commerce_indicator: String,
capture: Option<bool>,
capture_options: Option<CaptureOpt... | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 73 | rust | ProcessingInformation | null | null | null | null | null | null | null | null | null | null | null |
pub struct GlobalpayPaymentsRequest {
pub account_name: Secret<String>,
pub amount: Option<StringMinorUnit>,
pub currency: String,
pub reference: String,
pub country: api_models::enums::CountryAlpha2,
pub capture_mode: Option<CaptureMode>,
pub notifications: Option<Notifications>,
pub pa... | crates/hyperswitch_connectors/src/connectors/globalpay/requests.rs | hyperswitch_connectors | struct_definition | 105 | rust | GlobalpayPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
impl ExtractedPayload {
pub fn from_headers(headers: &HeaderMap) -> RouterResult<Self> {
let merchant_id = headers
.get(HEADER_MERCHANT_ID)
.and_then(|value| value.to_str().ok())
.ok_or_else(|| ApiErrorResponse::InvalidRequestData {
message: format!("`{HEA... | crates/router/src/services/authentication/detached.rs | router | impl_block | 548 | rust | null | ExtractedPayload | null | impl ExtractedPayload | null | null | null | null | null | null | null | null |
pub trait NetworkTokenizationProcess<'a, D> {
fn new(
state: &'a SessionState,
merchant_context: &'a domain::MerchantContext,
data: &'a D,
customer: &'a domain_request_types::CustomerDetails,
) -> Self;
async fn encrypt_card(
&self,
card_details: &domain::Card... | crates/router/src/core/payment_methods/tokenize.rs | router | trait_definition | 395 | rust | null | null | NetworkTokenizationProcess | null | null | null | null | null | null | null | null | null |
impl api::ConnectorRedirectResponse for Noon {
fn get_flow_type(
&self,
_query_params: &str,
_json_payload: Option<serde_json::Value>,
action: enums::PaymentAction,
) -> CustomResult<enums::CallConnectorAction, errors::ConnectorError> {
match action {
enums::P... | crates/hyperswitch_connectors/src/connectors/noon.rs | hyperswitch_connectors | impl_block | 119 | rust | null | Noon | api::ConnectorRedirectResponse for | impl api::ConnectorRedirectResponse for for Noon | null | null | null | null | null | null | null | null |
pub struct PaysafeCardExpiry {
pub month: Secret<String>,
pub year: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | PaysafeCardExpiry | null | null | null | null | null | null | null | null | null | null | null |
pub async fn log_dispute_delete(
&self,
delete_old_dispute: &Dispute,
tenant_id: TenantID,
) -> MQResult<()> {
self.log_event(&KafkaEvent::old(
&KafkaDispute::from_storage(delete_old_dispute),
tenant_id.clone(),
self.ckh_database_name.clone(),
... | crates/router/src/services/kafka.rs | router | function_signature | 105 | rust | null | null | null | null | log_dispute_delete | null | null | null | null | null | null | null |
pub struct DiscountObject {
pub value: f64,
pub limit_date: String, // YYYY-MM-DD
} | crates/hyperswitch_connectors/src/connectors/santander/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | DiscountObject | null | null | null | null | null | null | null | null | null | null | null |
pub trait AuthEventMetricAnalytics: LoadRow<AuthEventMetricRow> {} | crates/analytics/src/auth_events/metrics.rs | analytics | trait_definition | 16 | rust | null | null | AuthEventMetricAnalytics | null | null | null | null | null | null | null | null | null |
/// # Panics
///
/// Will panic even if fetching raw secret fails for at least one config value
pub async fn fetch_raw_secrets(
conf: Settings<SecuredSecret>,
secret_management_client: &dyn SecretManagementInterface,
) -> Settings<RawSecret> {
#[allow(clippy::expect_used)]
let database = Database::conve... | crates/drainer/src/secrets_transformers.rs | drainer | function_signature | 165 | rust | null | null | null | null | fetch_raw_secrets | null | null | null | null | null | null | null |
impl MerchantConnectorListResponse {
pub fn to_merchant_connector_info(&self, connector_label: &String) -> MerchantConnectorInfo {
MerchantConnectorInfo {
connector_label: connector_label.to_string(),
merchant_connector_id: self.merchant_connector_id.clone(),
}
}
pub ... | crates/api_models/src/admin.rs | api_models | impl_block | 79 | rust | null | MerchantConnectorListResponse | null | impl MerchantConnectorListResponse | null | null | null | null | null | null | null | null |
pub fn update(&mut self, new: Self) {
if let Some(max_total_count) = new.max_total_count {
self.max_total_count = Some(max_total_count)
}
} | crates/api_models/src/routing.rs | api_models | function_signature | 41 | rust | null | null | null | null | update | null | null | null | null | null | null | null |
pub async fn connector_service_decider<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: CallConne... | crates/router/src/core/payments.rs | router | function_signature | 908 | rust | null | null | null | null | connector_service_decider | null | null | null | null | null | null | null |
impl<F: Clone> PaymentData<F> {
// Get the method by which a card is discovered during a payment
#[cfg(feature = "v1")]
fn get_card_discovery_for_card_payment_method(&self) -> Option<common_enums::CardDiscovery> {
match self.payment_attempt.payment_method {
Some(storage_enums::PaymentMet... | crates/router/src/core/payments.rs | router | impl_block | 218 | rust | null | PaymentData | null | impl PaymentData | null | null | null | null | null | null | null | null |
pub fn validate(&self) -> Result<(), ApplicationError> {
use common_utils::fp_utils::when;
when(self.token_service_api_key.is_default_or_empty(), || {
Err(ApplicationError::InvalidConfigurationValueError(
"token_service_api_key must not be empty".into(),
))
... | crates/router/src/configs/validations.rs | router | function_signature | 229 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
pub fn generate_authorization_signature(
&self,
auth: &riskified::RiskifiedAuthType,
payload: &str,
) -> CustomResult<String, ConnectorError> {
let key = hmac::Key::new(
hmac::HMAC_SHA256,
auth.secret_token.clone().expose().as_bytes(),
);
let ... | crates/hyperswitch_connectors/src/connectors/riskified.rs | hyperswitch_connectors | function_signature | 108 | rust | null | null | null | null | generate_authorization_signature | null | null | null | null | null | null | null |
pub struct MollieRouterData<T> {
pub amount: StringMajorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | MollieRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn upsert_decision_manager_config(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<api_models::conditional_configs::DecisionManager>,
) -> impl Responder {
let flow = Flow::DecisionManagerUpsertConfig;
Box::pin(oss_api::server_wrap(
flow,
state,
... | crates/router/src/routes/routing.rs | router | function_signature | 269 | rust | null | null | null | null | upsert_decision_manager_config | null | null | null | null | null | null | null |
pub async fn get_external_vault_token(
state: &SessionState,
key_store: &domain::MerchantKeyStore,
storage_scheme: enums::MerchantStorageScheme,
payment_token: String,
vault_token: payment_method_data::VaultToken,
payment_method_type: &storage_enums::PaymentMethod,
) -> CustomResult<payment_meth... | crates/router/src/core/payment_methods.rs | router | function_signature | 480 | rust | null | null | null | null | get_external_vault_token | null | null | null | null | null | null | null |
pub struct KatapultRouterData<T> {
pub amount: StringMinorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/katapult/transformers.rs | hyperswitch_connectors | struct_definition | 50 | rust | KatapultRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub struct FrmFiltersResponse {
pub query_data: Vec<FrmFilterValue>,
} | crates/api_models/src/analytics.rs | api_models | struct_definition | 18 | rust | FrmFiltersResponse | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorStatusAndDisabledValidation<'_> {
fn validate_status_and_disabled(
&self,
) -> RouterResult<(api_enums::ConnectorStatus, Option<bool>)> {
let connector_status = match (self.status, self.auth) {
(
Some(common_enums::ConnectorStatus::Active),
... | crates/router/src/core/admin.rs | router | impl_block | 304 | rust | null | ConnectorStatusAndDisabledValidation | null | impl ConnectorStatusAndDisabledValidation | null | null | null | null | null | null | null | null |
pub struct UnifiedAuthenticationServicePreAuthenticateResponse {
status: UnifiedAuthenticationServicePreAuthenticateStatus,
pub eligibility: Option<Eligibility>,
} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs | hyperswitch_connectors | struct_definition | 30 | rust | UnifiedAuthenticationServicePreAuthenticateResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/payment_methods/vault.rs
Public functions: 28
Public structs: 8
use common_enums::PaymentMethodType;
#[cfg(feature = "v2")]
use common_utils::request;
use common_utils::{
crypto::{DecodeMessage, EncodeMessage, GcmAes256},
ext_traits::{BytesExt, Encode},
generate_id_with_defau... | crates/router/src/core/payment_methods/vault.rs#chunk0 | router | chunk | 8,191 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/common_enums/src/enums.rs
Public functions: 34
Public structs: 1
mod accounts;
mod payments;
mod ui;
use std::{
collections::HashSet,
num::{ParseFloatError, TryFromIntError},
};
pub use accounts::{
MerchantAccountRequestType, MerchantAccountType, MerchantProductType, OrganizationType,
};
pu... | crates/common_enums/src/enums.rs#chunk0 | common_enums | chunk | 8,188 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_token_vault_api(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<api_models::tokenization::GenericTokenizationRequest>,
) -> HttpResponse {
let flow = Flow::TokenizationCreate;
let payload = json_payload.into_inner();
let customer_id = payload.customer_i... | crates/router/src/routes/tokenization.rs | router | function_signature | 235 | rust | null | null | null | null | create_token_vault_api | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/hipay.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 HipayTest;
impl C... | crates/router/tests/connectors/hipay.rs | router | full_file | 2,925 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl common_utils::events::ApiEventMetric for EphemeralKeyCreateResponse {
fn get_api_event_type(&self) -> Option<common_utils::events::ApiEventsType> {
Some(common_utils::events::ApiEventsType::Miscellaneous)
}
} | crates/api_models/src/ephemeral_key.rs | api_models | impl_block | 56 | rust | null | EphemeralKeyCreateResponse | common_utils::events::ApiEventMetric for | impl common_utils::events::ApiEventMetric for for EphemeralKeyCreateResponse | null | null | null | null | null | null | null | null |
/// Get string representation of the id
pub fn get_string_repr(&self) -> &str {
self.0.get_string_repr()
} | crates/common_utils/src/id_type/global_id/customer.rs | common_utils | function_signature | 31 | rust | null | null | null | null | get_string_repr | null | null | null | null | null | null | null |
pub struct CoinbaseErrorResponse {
pub error: CoinbaseErrorData,
} | crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | CoinbaseErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct KlarnaCaptureResponse {
pub capture_id: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/klarna/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | KlarnaCaptureResponse | null | null | null | null | null | null | null | null | null | null | null |
/// Create a Merchant id from MerchantName
pub fn from_merchant_name(merchant_name: MerchantName) -> Self {
let merchant_name_string = merchant_name.into_inner();
let merchant_id_prefix = merchant_name_string.trim().to_lowercase().replace(' ', "");
let alphanumeric_id =
AlphaNu... | crates/common_utils/src/id_type/merchant.rs | common_utils | function_signature | 101 | rust | null | null | null | null | from_merchant_name | null | null | null | null | null | null | null |
pub struct SuccessRateAccumulator {
pub success: i64,
pub total: i64,
} | crates/analytics/src/payments/accumulator.rs | analytics | struct_definition | 25 | rust | SuccessRateAccumulator | null | null | null | null | null | null | null | null | null | null | null |
impl api::Payment for Payeezy {} | crates/hyperswitch_connectors/src/connectors/payeezy.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Payeezy | api::Payment for | impl api::Payment for for Payeezy | null | null | null | null | null | null | null | null |
pub async fn get_token_with_user_role(
&self,
state: &SessionState,
user_role: &UserRole,
) -> UserResult<Secret<String>> {
match self.next_flow {
UserFlow::SPTFlow(spt_flow) => spt_flow.generate_spt(state, self).await,
UserFlow::JWTFlow(jwt_flow) => {
... | crates/router/src/types/domain/user/decision_manager.rs | router | function_signature | 141 | rust | null | null | null | null | get_token_with_user_role | null | null | null | null | null | null | null |
pub async fn generate_sample_data(
state: web::Data<AppState>,
http_req: HttpRequest,
payload: web::Json<SampleDataRequest>,
) -> impl actix_web::Responder {
use crate::core::user::sample_data;
let flow = Flow::GenerateSampleData;
Box::pin(api::server_wrap(
flow,
state,
... | crates/router/src/routes/user.rs | router | function_signature | 135 | rust | null | null | null | null | generate_sample_data | null | null | null | null | null | null | null |
File: crates/router/src/core/user/sample_data.rs
Public functions: 2
use api_models::user::sample_data::SampleDataRequest;
use common_utils::errors::ReportSwitchExt;
use diesel_models::{DisputeNew, RefundNew};
use error_stack::ResultExt;
use hyperswitch_domain_models::payments::PaymentIntent;
pub type SampleDataApiR... | crates/router/src/core/user/sample_data.rs | router | full_file | 951 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn new(headers: &'a HeaderMap) -> Self {
HeaderMapStruct { headers }
} | crates/router/src/services/authentication.rs | router | function_signature | 22 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
#[cfg(feature = "payouts")]
amount_converter: &MinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/payone.rs | hyperswitch_connectors | function_signature | 37 | rust | null | null | null | null | new | 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.