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 struct RequestExtendedAuthorizationBool(bool); | crates/common_utils/src/types/primitive_wrappers.rs | common_utils | struct_definition | 8 | rust | RequestExtendedAuthorizationBool | null | null | null | null | null | null | null | null | null | null | null |
pub async fn delete_tokenized_data_api() {} | crates/openapi/src/routes/tokenization.rs | openapi | function_signature | 10 | rust | null | null | null | null | delete_tokenized_data_api | null | null | null | null | null | null | null |
pub fn get_viz_digraph_string(&self) -> String {
let mut ctx = PrinterContext::default();
let digraph = self.get_viz_digraph();
digraph.print(&mut ctx)
} | crates/hyperswitch_constraint_graph/src/graph.rs | hyperswitch_constraint_graph | function_signature | 46 | rust | null | null | null | null | get_viz_digraph_string | null | null | null | null | null | null | null |
impl ConnectorCommon for Celero {
fn id(&self) -> &'static str {
"celero"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Minor
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connectors: &'a... | crates/hyperswitch_connectors/src/connectors/celero.rs | hyperswitch_connectors | impl_block | 447 | rust | null | Celero | ConnectorCommon for | impl ConnectorCommon for for Celero | null | null | null | null | null | null | null | null |
Ok(match config {
Ok(conf) => Some(
serde_json::from_str::<Vec<storage_enums::PaymentMethodType>>(&conf.config)
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("skip_save_wallet_at_connector config parsing failed")?,
),
... | crates/router/src/core/payments/helpers.rs#chunk7 | router | chunk | 3,820 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/storage_impl/src/payments/payment_attempt.rs
use common_utils::errors::CustomResult;
#[cfg(feature = "v2")]
use common_utils::types::keymanager::KeyManagerState;
#[cfg(feature = "v1")]
use common_utils::{
fallback_reverse_lookup_not_found,
types::{ConnectorTransactionId, ConnectorTransactionIdTrai... | crates/storage_impl/src/payments/payment_attempt.rs#chunk0 | storage_impl | chunk | 8,184 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_role(
state: SessionState,
user_from_token: UserFromToken,
req: role_api::CreateRoleRequest,
_req_state: ReqState,
) -> UserResponse<role_api::RoleInfoWithGroupsResponse> {
let now = common_utils::date_time::now();
let user_entity_type = user_from_token
.get_role_inf... | crates/router/src/core/user_role/role.rs | router | function_signature | 740 | rust | null | null | null | null | create_role | null | null | null | null | null | null | null |
pub struct CardsRefundResponse {
pub status: i64,
pub description: Option<String>,
pub instance_id: String,
pub payment_status: String,
pub payment_description: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs | hyperswitch_connectors | struct_definition | 45 | rust | CardsRefundResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayboxRefundRequest {
#[serde(rename = "DATEQ")]
pub date: String,
#[serde(rename = "TYPE")]
pub transaction_type: String,
#[serde(rename = "NUMQUESTION")]
pub paybox_request_number: String,
#[serde(rename = "MONTANT")]
pub amount: MinorUnit,
#[serde(rename = "VERSION"... | crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs | hyperswitch_connectors | struct_definition | 188 | rust | PayboxRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct KafkaRefund<'a> {
pub internal_reference_id: &'a String,
pub refund_id: &'a String, //merchant_reference id
pub payment_id: &'a id_type::PaymentId,
pub merchant_id: &'a id_type::MerchantId,
pub connector_transaction_id: &'a String,
pub connector: &'a String,
pub connector_refund_i... | crates/router/src/services/kafka/refund.rs | router | struct_definition | 313 | rust | KafkaRefund | null | null | null | null | null | null | null | null | null | null | null |
pub fn should_check_for_customer_saved_payment_method_type(self) -> bool {
matches!(
self,
Self::ApplePay | Self::GooglePay | Self::SamsungPay | Self::Paypal | Self::Klarna
)
} | crates/common_enums/src/enums.rs | common_enums | function_signature | 52 | rust | null | null | null | null | should_check_for_customer_saved_payment_method_type | null | null | null | null | null | null | null |
pub struct TransactionData {
payment_type: Option<Secret<String>>,
status_code: Secret<i32>,
txn_secret: Option<Secret<String>>,
tid: Option<Secret<i64>>,
test_mode: Option<Secret<i8>>,
status: Option<JpmorganTransactionStatus>,
} | crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs | hyperswitch_connectors | struct_definition | 63 | rust | TransactionData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn generate_sample_data_for_user(
state: SessionState,
user_from_token: UserFromToken,
req: SampleDataRequest,
_req_state: ReqState,
) -> SampleDataApiResponse<()> {
let sample_data = utils::user::sample_data::generate_sample_data(
&state,
req,
&user_from_token.merc... | crates/router/src/core/user/sample_data.rs | router | function_signature | 498 | rust | null | null | null | null | generate_sample_data_for_user | null | null | null | null | null | null | null |
impl api::RefundExecute for Zen {} | crates/hyperswitch_connectors/src/connectors/zen.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Zen | api::RefundExecute for | impl api::RefundExecute for for Zen | null | null | null | null | null | null | null | null |
pub struct FacilitapayConnectorMetadataObject {
// pub destination_account_number: Secret<String>,
pub destination_account_number: MaskedBankAccount,
} | crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs | hyperswitch_connectors | struct_definition | 32 | rust | FacilitapayConnectorMetadataObject | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_cards_info(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<cards_info_api_types::CardInfoCreateRequest>,
) -> impl Responder {
let payload = json_payload.into_inner();
let flow = Flow::CardsInfoCreate;
Box::pin(api::server_wrap(
flow,
st... | crates/router/src/routes/cards_info.rs | router | function_signature | 132 | rust | null | null | null | null | create_cards_info | null | null | null | null | null | null | null |
pub fn get_routing_dictionary_key(merchant_id: &str) -> String {
format!("routing_dict_{merchant_id}")
} | crates/router/src/core/routing/helpers.rs | router | function_signature | 26 | rust | null | null | null | null | get_routing_dictionary_key | null | null | null | null | null | null | null |
impl ConnectorRedirectResponse for Xendit {
fn get_flow_type(
&self,
_query_params: &str,
_json_payload: Option<serde_json::Value>,
action: PaymentAction,
) -> CustomResult<CallConnectorAction, errors::ConnectorError> {
match action {
PaymentAction::PSync
... | crates/hyperswitch_connectors/src/connectors/xendit.rs | hyperswitch_connectors | impl_block | 102 | rust | null | Xendit | ConnectorRedirectResponse for | impl ConnectorRedirectResponse for for Xendit | null | null | null | null | null | null | null | null |
pub fn build_query(&mut self) -> QueryResult<String>
where
Aggregate<&'static str>: ToSql<T>,
Window<&'static str>: ToSql<T>,
{
if self.columns.is_empty() {
Err(QueryBuildingError::InvalidQuery(
"No select fields provided",
))?;
}
l... | crates/analytics/src/query.rs | analytics | function_signature | 502 | rust | null | null | null | null | build_query | null | null | null | null | null | null | null |
pub async fn create_domain_model_from_request(
payment_id: &id_type::GlobalPaymentId,
merchant_context: &merchant_context::MerchantContext,
profile: &business_profile::Profile,
request: api_models::payments::PaymentsCreateIntentRequest,
decrypted_payment_intent: DecryptedPaymentI... | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | function_signature | 992 | rust | null | null | null | null | create_domain_model_from_request | null | null | null | null | null | null | null |
pub struct LockingInput {
pub unique_locking_key: String,
pub api_identifier: lock_utils::ApiIdentifier,
pub override_lock_retries: Option<u32>,
} | crates/router/src/core/api_locking.rs | router | struct_definition | 39 | rust | LockingInput | null | null | null | null | null | null | null | null | null | null | null |
impl Default for ConnectorPTMapping {
fn default() -> Self {
Self {
custom_merchant_mapping: HashMap::new(),
default_mapping: RetryMapping {
start_after: 60,
frequencies: vec![(300, 5)],
},
max_retries_count: 5,
}
}
... | crates/scheduler/src/consumer/types/process_data.rs | scheduler | impl_block | 71 | rust | null | ConnectorPTMapping | Default for | impl Default for for ConnectorPTMapping | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/facilitapay.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub async fn find_by_payment_id(
conn: &PgPooledConn,
payment_id: &common_utils::id_type::GlobalPaymentId,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<<Self as HasTable>::Table, _, _, _>(
conn,
dsl::payment_id.eq(payment_id.to_owned()),
None... | crates/diesel_models/src/query/payment_attempt.rs | diesel_models | function_signature | 97 | rust | null | null | null | null | find_by_payment_id | null | null | null | null | null | null | null |
File: crates/analytics/src/payment_intents/metrics/sessionized_metrics.rs
mod payment_intent_count;
mod payment_processed_amount;
mod payments_distribution;
mod payments_success_rate;
mod smart_retried_amount;
mod successful_smart_retries;
mod total_smart_retries;
pub(super) use payment_intent_count::PaymentIntentCou... | crates/analytics/src/payment_intents/metrics/sessionized_metrics.rs | analytics | full_file | 161 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/payments/metrics/success_rate.rs
use std::collections::HashSet;
use api_models::analytics::{
payments::{PaymentDimensions, PaymentFilters, PaymentMetricsBucketIdentifier},
Granularity, TimeRange,
};
use common_utils::errors::ReportSwitchExt;
use error_stack::ResultExt;
use time::Pri... | crates/analytics/src/payments/metrics/success_rate.rs | analytics | full_file | 949 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Moneris {} | crates/hyperswitch_connectors/src/connectors/moneris.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Moneris | api::PaymentToken for | impl api::PaymentToken for for Moneris | null | null | null | null | null | null | null | null |
pub fn new(query_type: OpenSearchQuery, query: String, search_params: Vec<AuthInfo>) -> Self {
Self {
query_type,
query,
search_params,
offset: Default::default(),
count: Default::default(),
filters: Default::default(),
time_ran... | crates/analytics/src/opensearch.rs | analytics | function_signature | 119 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct NmiValidateRequest {
#[serde(rename = "type")]
transaction_type: TransactionType,
security_key: Secret<String>,
ccnumber: CardNumber,
ccexp: Secret<String>,
cvv: Secret<String>,
orderid: String,
customer_vault: CustomerAction,
} | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs | hyperswitch_connectors | struct_definition | 65 | rust | NmiValidateRequest | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
use hyperswitch_domain_models::payments::PaymentStatusData;
let flow = match payload.force_sync {
true => Flow::PaymentsRetrieveForceSync,
false => Flow::PaymentsRetrieve,
};
let global_payment_id = path.into_inner();
tracing::Span::current().record("payment_id", g... | crates/router/src/routes/payments.rs | router | impl_block | 477 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CountryAlpha3
{
"type": "string",
"enum": [
"AFG",
"ALA",
"ALB",
"DZA",
"ASM",
"AND",
"AGO",
"AIA",
"ATA",
"ATG",
"ARG",
"ARM",
"ABW",
"AUS",
"AUT",
"AZE",
"BHS",
"BHR",
"BGD",
"BRB",
"BLR",
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 1,227 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CountryAlpha3"
] | null | null | null | null |
pub struct ConnectorPostAuthenticationRequestData {
pub threeds_server_transaction_id: String,
} | crates/hyperswitch_domain_models/src/router_request_types/authentication.rs | hyperswitch_domain_models | struct_definition | 20 | rust | ConnectorPostAuthenticationRequestData | null | null | null | null | null | null | null | null | null | null | null |
pub fn api_error_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let ast = syn::parse_macro_input!(input as syn::DeriveInput);
let tokens =
macros::api_error_derive_inner(&ast).unwrap_or_else(|error| error.to_compile_error());
tokens.into()
} | crates/router_derive/src/lib.rs | router_derive | function_signature | 70 | rust | null | null | null | null | api_error_derive | null | null | null | null | null | null | null |
/// Generate a new GlobalRefundId from a cell id
pub fn generate(cell_id: &crate::id_type::CellId) -> Self {
let global_id = super::GlobalId::generate(cell_id, super::GlobalEntity::Refund);
Self(global_id)
} | crates/common_utils/src/id_type/global_id/refunds.rs | common_utils | function_signature | 61 | rust | null | null | null | null | generate | null | null | null | null | null | null | null |
impl Adyenplatform {
pub const fn new() -> &'static Self {
&Self {
#[cfg(feature = "payouts")]
amount_converter: &MinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/adyenplatform.rs | hyperswitch_connectors | impl_block | 45 | rust | null | Adyenplatform | null | impl Adyenplatform | null | null | null | null | null | null | null | null |
pub struct GooglePayDetails {
encrypted_payment_token: Secret<String>,
payment_data_type: GpayPaymentDataType,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | GooglePayDetails | null | null | null | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Billwerk {} | crates/hyperswitch_connectors/src/connectors/billwerk.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Billwerk | api::MandateSetup for | impl api::MandateSetup for for Billwerk | null | null | null | null | null | null | null | null |
pub struct DeleteEvidenceRequest {
/// Id of the dispute
pub dispute_id: String,
/// Evidence Type to be deleted
pub evidence_type: EvidenceType,
} | crates/api_models/src/disputes.rs | api_models | struct_definition | 37 | rust | DeleteEvidenceRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct InvalidCrmConfig(pub &'static str); | crates/external_services/src/crm.rs | external_services | struct_definition | 11 | rust | InvalidCrmConfig | null | null | null | null | null | null | null | null | null | null | null |
impl Wellsfargo {
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
}
pub fn generate_digest(&self, payload: &[u8]) -> String {
let payload_digest = digest::digest(&digest::SHA256, payload);
consts::BASE64_ENGINE.encode(pay... | crates/hyperswitch_connectors/src/connectors/wellsfargo.rs | hyperswitch_connectors | impl_block | 564 | rust | null | Wellsfargo | null | impl Wellsfargo | null | null | null | null | null | null | null | null |
impl MerchantKeyStore {
pub async fn find_by_merchant_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
dsl::merchant_id.eq(merchant_id.to_owned... | crates/diesel_models/src/query/merchant_key_store.rs | diesel_models | impl_block | 407 | rust | null | MerchantKeyStore | null | impl MerchantKeyStore | null | null | null | null | null | null | null | null |
pub fn inner(&self) -> &HashMap<String, ConnectorAuthType> {
&self.0
} | crates/test_utils/src/connector_auth.rs | test_utils | function_signature | 24 | rust | null | null | null | null | inner | null | null | null | null | null | null | null |
/// Trait to add necessary headers to the tonic Request
pub(crate) trait AddHeaders {
/// Add necessary header fields to the tonic Request
fn add_headers_to_grpc_request(&mut self, headers: GrpcHeaders);
} | crates/external_services/src/grpc_client.rs | external_services | trait_definition | 48 | rust | null | null | AddHeaders | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_domain_models/src/consts.rs
//! Constants that are used in the domain models.
use std::{collections::HashSet, sync::LazyLock};
pub static ROUTING_ENABLED_PAYMENT_METHODS: LazyLock<HashSet<common_enums::PaymentMethod>> =
LazyLock::new(|| {
let mut set = HashSet::new();
set... | crates/hyperswitch_domain_models/src/consts.rs | hyperswitch_domain_models | full_file | 265 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router_env/src/metrics.rs
Public functions: 1
//! Utilities to easily create opentelemetry contexts, meters and metrics.
/// Create a global [`Meter`][Meter] with the specified name and an optional description.
///
/// [Meter]: opentelemetry::metrics::Meter
#[macro_export]
macro_rules! global_meter {
... | crates/router_env/src/metrics.rs | router_env | full_file | 1,478 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/api_models/src/errors/actix.rs
use super::types::ApiErrorResponse;
impl actix_web::ResponseError for ApiErrorResponse {
fn status_code(&self) -> reqwest::StatusCode {
use reqwest::StatusCode;
match self {
Self::Unauthorized(_) => StatusCode::UNAUTHORIZED,
Self... | crates/api_models/src/errors/actix.rs | api_models | full_file | 279 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/payone.rs
use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct PayoneTest;
impl ConnectorActions for PayoneTest {}
impl utils::Connector for PayoneTest {
... | crates/router/tests/connectors/payone.rs | router | full_file | 2,925 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct NovalnetResponseBilling {
pub city: Option<Secret<String>>,
pub country_code: Option<Secret<String>>,
pub house_no: Option<Secret<String>>,
pub street: Option<Secret<String>>,
pub zip: Option<Secret<String>>,
pub state: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 65 | rust | NovalnetResponseBilling | null | null | null | null | null | null | null | null | null | null | null |
impl FlowMetric for Flow {} | crates/router/src/routes/dummy_connector/types.rs | router | impl_block | 6 | rust | null | Flow | FlowMetric for | impl FlowMetric for for Flow | null | null | null | null | null | null | null | null |
pub struct AuthenticationCount; | crates/api_models/src/analytics/auth_events.rs | api_models | struct_definition | 5 | rust | AuthenticationCount | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.AmazonPayDeliveryPrice
{
"type": "object",
"required": [
"amount",
"currency_code"
],
"properties": {
"amount": {
"$ref": "#/components/schemas/MinorUnit"
},
"currency_code": {
"$ref": "#/components/schemas/Currency"
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 87 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"AmazonPayDeliveryPrice"
] | null | null | null | null |
pub async fn create_key_in_key_manager(
state: &KeyManagerState,
request_body: EncryptionCreateRequest,
) -> errors::CustomResult<DataKeyCreateResponse, errors::KeyManagerError> {
call_encryption_service(state, Method::POST, "key/create", request_body)
.await
.change_context(errors::KeyManag... | crates/common_utils/src/keymanager.rs | common_utils | function_signature | 80 | rust | null | null | null | null | create_key_in_key_manager | null | null | null | null | null | null | null |
pub async fn trigger_webhook_and_handle_response(
state: &SessionState,
merchant_context: &domain::MerchantContext,
payout_data: &PayoutData,
) -> RouterResponse<payouts::PayoutCreateResponse> {
let response = response_handler(state, merchant_context, payout_data).await?;
utils::trigger_payouts_webh... | crates/router/src/core/payouts.rs | router | function_signature | 97 | rust | null | null | null | null | trigger_webhook_and_handle_response | null | null | null | null | null | null | null |
pub struct FileMetadataUpdateInternal {
provider_file_id: Option<String>,
file_upload_provider: Option<common_enums::FileUploadProvider>,
available: bool,
profile_id: Option<common_utils::id_type::ProfileId>,
merchant_connector_id: Option<common_utils::id_type::MerchantConnectorAccountId>,
} | crates/diesel_models/src/file.rs | diesel_models | struct_definition | 68 | rust | FileMetadataUpdateInternal | null | null | null | null | null | null | null | null | null | null | null |
pub async fn delete_sample_data_for_user(
state: SessionState,
user_from_token: UserFromToken,
_req: SampleDataRequest,
_req_state: ReqState,
) -> SampleDataApiResponse<()> {
let merchant_id_del = user_from_token.merchant_id;
let key_manager_state = &(&state).into();
let key_store = state
... | crates/router/src/core/user/sample_data.rs | router | function_signature | 305 | rust | null | null | null | null | delete_sample_data_for_user | null | null | null | null | null | null | null |
impl RequestIdStore for MockDb {} | crates/router/src/db.rs | router | impl_block | 8 | rust | null | MockDb | RequestIdStore for | impl RequestIdStore for for MockDb | null | null | null | null | null | null | null | null |
pub struct MonerisPaymentsCaptureRequest {
amount: Amount,
idempotency_key: String,
} | crates/hyperswitch_connectors/src/connectors/moneris/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | MonerisPaymentsCaptureRequest | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.BecsBankDebitAdditionalData
{
"type": "object",
"required": [
"account_number",
"bsb_number"
],
"properties": {
"account_number": {
"type": "string",
"description": "Partially masked account number for Becs payment method",
"example": "0001***... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 181 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"BecsBankDebitAdditionalData"
] | null | null | null | null |
OpenAPI Block Path: components.schemas.MerchantDetails
{
"type": "object",
"properties": {
"primary_contact_person": {
"type": "string",
"description": "The merchant's primary contact name",
"example": "John Doe",
"nullable": true,
"maxLength": 255
},
"primary_phone": {
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 548 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"MerchantDetails"
] | null | null | null | null |
pub struct RecoveryTimestamp {
pub initial_timestamp_in_seconds: i64,
pub job_schedule_buffer_time_in_seconds: i64,
pub reopen_workflow_buffer_time_in_seconds: i64,
pub max_random_schedule_delay_in_seconds: i64,
} | crates/router/src/types/storage/revenue_recovery.rs | router | struct_definition | 56 | rust | RecoveryTimestamp | null | null | null | null | null | null | null | null | null | null | null |
impl IncomingWebhook for Razorpay {
// fn get_webhook_object_reference_id(
// &self,
// request: &IncomingWebhookRequestDetails<'_>,
// ) -> CustomResult<webhooks::ObjectReferenceId, errors::ConnectorError> {
// let webhook_resource_object: razorpay::RazorpayWebhookPayload = request
// ... | crates/hyperswitch_connectors/src/connectors/razorpay.rs | hyperswitch_connectors | impl_block | 565 | rust | null | Razorpay | IncomingWebhook for | impl IncomingWebhook for for Razorpay | null | null | null | null | null | null | null | null |
pub struct GenericLinkUpdateInternal {
pub link_status: Option<GenericLinkStatus>,
} | crates/diesel_models/src/generic_link.rs | diesel_models | struct_definition | 19 | rust | GenericLinkUpdateInternal | null | null | null | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/business_profile.rs
Public functions: 5
Public structs: 16
use std::collections::{HashMap, HashSet};
use common_enums::{AuthenticationConnectors, UIWidgetFormLayout, VaultSdk};
use common_types::primitive_wrappers;
use common_utils::{encryption::Encryption, pii};
use diesel::{AsChange... | crates/diesel_models/src/business_profile.rs#chunk0 | diesel_models | chunk | 8,191 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_authorization_info_with_groups(
_state: SessionState,
) -> UserResponse<user_role_api::AuthorizationInfoResponse> {
Ok(ApplicationResponse::Json(
user_role_api::AuthorizationInfoResponse(
info::get_group_authorization_info()
.ok_or(UserErrors::InternalServerE... | crates/router/src/core/user_role.rs | router | function_signature | 103 | rust | null | null | null | null | get_authorization_info_with_groups | null | null | null | null | null | null | null |
pub struct RoutingVolumeSplitWrapper {
pub routing_info: RoutingVolumeSplit,
pub profile_id: common_utils::id_type::ProfileId,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 31 | rust | RoutingVolumeSplitWrapper | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.EligibilityResponseParams
{
"oneOf": [
{
"type": "object",
"required": [
"ThreeDsData"
],
"properties": {
"ThreeDsData": {
"$ref": "#/components/schemas/ThreeDsData"
}
}
}
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 78 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"EligibilityResponseParams"
] | null | null | null | null |
impl Strength {
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 | impl_block | 38 | rust | null | Strength | null | impl Strength | null | null | null | null | null | null | null | null |
impl StaticRoutingAlgorithm {
pub fn get_kind(&self) -> RoutingAlgorithmKind {
match self {
Self::Single(_) => RoutingAlgorithmKind::Single,
Self::Priority(_) => RoutingAlgorithmKind::Priority,
Self::VolumeSplit(_) => RoutingAlgorithmKind::VolumeSplit,
Self::A... | crates/api_models/src/routing.rs | api_models | impl_block | 95 | rust | null | StaticRoutingAlgorithm | null | impl StaticRoutingAlgorithm | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorizeSessionToken for Square {} | crates/hyperswitch_connectors/src/connectors/square.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Square | api::PaymentAuthorizeSessionToken for | impl api::PaymentAuthorizeSessionToken for for Square | null | null | null | null | null | null | null | null |
pub struct RelayRefundRequestData {
/// The amount that is being refunded
#[schema(value_type = i64 , example = 6540)]
pub amount: MinorUnit,
/// The currency in which the amount is being refunded
#[schema(value_type = Currency)]
pub currency: api_enums::Currency,
/// The reason for the refu... | crates/api_models/src/relay.rs | api_models | struct_definition | 107 | rust | RelayRefundRequestData | null | null | null | null | null | null | null | null | null | null | null |
pub trait SdkEventMetricAccumulator {
type MetricOutput;
fn add_metrics_bucket(&mut self, metrics: &SdkEventMetricRow);
fn collect(self) -> Self::MetricOutput;
} | crates/analytics/src/sdk_events/accumulator.rs | analytics | trait_definition | 44 | rust | null | null | SdkEventMetricAccumulator | null | null | null | null | null | null | null | null | null |
pub struct PaymentResponse {
status: GocardlessPaymentStatus,
id: String,
} | crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | PaymentResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/routes/metrics.rs
pub mod bg_metrics_collector;
pub mod request;
use router_env::{counter_metric, global_meter, histogram_metric_f64};
global_meter!(GLOBAL_METER, "ROUTER_API");
counter_metric!(HEALTH_METRIC, GLOBAL_METER); // No. of health API hits
counter_metric!(KV_MISS, GLOBAL_METER); //... | crates/router/src/routes/metrics.rs | router | full_file | 1,449 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl PartnerReferralResponse {
pub fn extract_action_url(self) -> RouterResult<String> {
Ok(self
.links
.into_iter()
.find(|hateoas_link| hateoas_link.rel == "action_url")
.ok_or(ApiErrorResponse::InternalServerError)
.attach_printable("Failed to g... | crates/router/src/types/api/connector_onboarding/paypal.rs | router | impl_block | 85 | rust | null | PartnerReferralResponse | null | impl PartnerReferralResponse | null | null | null | null | null | null | null | null |
impl MandateNew {
pub fn update_storage_scheme(&mut self, storage_scheme: MerchantStorageScheme) {
self.updated_by = Some(storage_scheme.to_string());
}
/// Returns customer_user_agent_extended with customer_user_agent as fallback
pub fn get_customer_user_agent_extended(&self) -> Option<String>... | crates/diesel_models/src/mandate.rs | diesel_models | impl_block | 91 | rust | null | MandateNew | null | impl MandateNew | null | null | null | null | null | null | null | null |
impl PaymentsPostProcessing for Plaid {} | crates/hyperswitch_connectors/src/connectors/plaid.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Plaid | PaymentsPostProcessing for | impl PaymentsPostProcessing for for Plaid | null | null | null | null | null | null | null | null |
pub async fn create_tokenize(
state: &routes::SessionState,
value1: String,
value2: Option<String>,
lookup_key: String,
encryption_key: &masking::Secret<Vec<u8>>,
) -> RouterResult<String> {
let redis_key = get_redis_locker_key(lookup_key.as_str());
let func = || async {
metrics::CRE... | crates/router/src/core/payment_methods/vault.rs | router | function_signature | 477 | rust | null | null | null | null | create_tokenize | null | null | null | null | null | null | null |
/// Get the hash key to be stored in redis
pub fn get_hash_key_for_kv_store(&self) -> String {
format!("pi_{}", self.0 .0 .0)
} | crates/common_utils/src/id_type/payment.rs | common_utils | function_signature | 42 | rust | null | null | null | null | get_hash_key_for_kv_store | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/mandates/revoke/{mandate_id}"
{
"post": {
"tags": [
"Mandates"
],
"summary": "Mandates - Revoke Mandate",
"description": "Revokes a mandate created using the Payments/Create API",
"operationId": "Revoke a Mandate",
"parameters": [
{
"name": "mand... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 244 | .json | null | null | null | null | null | openapi_spec | paths | [
"/mandates/revoke/{mandate_id}"
] | null | null | null | null |
pub struct ReasonsResult {
pub reason: String,
pub count: i64,
pub percentage: f64,
} | crates/api_models/src/analytics/refunds.rs | api_models | struct_definition | 28 | rust | ReasonsResult | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs
Public structs: 12
use cards::CardNumber;
use common_enums::{enums, Currency};
use common_utils::{pii::Email, types::StringMajorUnit};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
... | crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs | hyperswitch_connectors | full_file | 5,331 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_payment_method(&self) -> Option<common_enums::PaymentMethod> {
match self {
Self::Card(_) | Self::NetworkToken(_) | Self::CardDetailsForNetworkTransactionId(_) => {
Some(common_enums::PaymentMethod::Card)
}
Self::CardRedirect(_) => Some(common_enums... | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | function_signature | 330 | rust | null | null | null | null | get_payment_method | null | null | null | null | null | null | null |
pub struct RefundResponse {
id: String,
status: RefundStatus,
} | crates/hyperswitch_connectors/src/connectors/hyperwallet/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | RefundResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct FeatureMetadata {
/// Redirection response coming in request as metadata field only for redirection scenarios
pub redirect_response: Option<RedirectResponse>,
/// Additional tags to be used for global search
pub search_tags: Option<Vec<HashedString<WithType>>>,
/// Recurring payment detai... | crates/diesel_models/src/types.rs | diesel_models | struct_definition | 133 | rust | FeatureMetadata | null | null | null | null | null | null | null | null | null | null | null |
impl api::UasPostAuthentication for UnifiedAuthenticationService {} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs | hyperswitch_connectors | impl_block | 12 | rust | null | UnifiedAuthenticationService | api::UasPostAuthentication for | impl api::UasPostAuthentication for for UnifiedAuthenticationService | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Chargebee {} | crates/hyperswitch_connectors/src/connectors/chargebee.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Chargebee | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Chargebee | null | null | null | null | null | null | null | null |
pub async fn internal_sync_refund_with_gateway(
state: &SessionState,
merchant_context: &domain::MerchantContext,
payment_attempt: &storage::PaymentAttempt,
payment_intent: &storage::PaymentIntent,
refund: &diesel_refund::Refund,
merchant_connector_details: common_types::domain::MerchantConnecto... | crates/router/src/core/refunds_v2.rs | router | function_signature | 489 | rust | null | null | null | null | internal_sync_refund_with_gateway | null | null | null | null | null | null | null |
pub struct ArchipelRouterData<T> {
pub amount: MinorUnit,
pub tenant_id: ArchipelTenantId,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs | hyperswitch_connectors | struct_definition | 34 | rust | ArchipelRouterData | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Fiserv {} | crates/hyperswitch_connectors/src/connectors/fiserv.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Fiserv | ConnectorValidation for | impl ConnectorValidation for for Fiserv | null | null | null | null | null | null | null | null |
impl api::ConnectorCustomer for Authorizedotnet {} | crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Authorizedotnet | api::ConnectorCustomer for | impl api::ConnectorCustomer for for Authorizedotnet | null | null | null | null | null | null | null | null |
File: crates/common_utils/src/id_type/api_key.rs
Public functions: 1
crate::id_type!(
ApiKeyId,
"A type for key_id that can be used for API key IDs"
);
crate::impl_id_type_methods!(ApiKeyId, "key_id");
// This is to display the `ApiKeyId` as ApiKeyId(abcd)
crate::impl_debug_id_type!(ApiKeyId);
crate::impl_tr... | crates/common_utils/src/id_type/api_key.rs | common_utils | full_file | 384 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentSession for Plaid {} | crates/hyperswitch_connectors/src/connectors/plaid.rs | hyperswitch_connectors | impl_block | 7 | rust | null | Plaid | PaymentSession for | impl PaymentSession for for Plaid | null | null | null | null | null | null | null | null |
pub async fn try_redis_get_else_try_database_get<F, RFut, DFut, T>(
redis_fut: RFut,
database_call_closure: F,
) -> error_stack::Result<T, errors::StorageError>
where
F: FnOnce() -> DFut,
RFut: futures::Future<Output = error_stack::Result<T, redis_interface::errors::RedisError>>,
DFut: futures::Futu... | crates/router/src/utils/db_utils.rs | router | function_signature | 206 | rust | null | null | null | null | try_redis_get_else_try_database_get | null | null | null | null | null | null | null |
/// Hashmap to store mca_id's with product names
pub struct AuthenticationConnectorAccountMap(
HashMap<enums::AuthenticationProduct, common_utils::id_type::MerchantConnectorAccountId>,
); | crates/common_types/src/payments.rs | common_types | struct_definition | 39 | rust | AuthenticationConnectorAccountMap | null | null | null | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/sift.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub async fn get_profile_payment_filters(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<GetPaymentFiltersRequest>,
) -> impl Responder {
let flow = AnalyticsFlow::GetPaymentFilters;
Box::pin(api::server_wrap(
flow,
st... | crates/router/src/analytics.rs | router | function_signature | 269 | rust | null | null | null | null | get_profile_payment_filters | null | null | null | null | null | null | null |
pub async fn list_user_roles_details(
state: web::Data<AppState>,
req: HttpRequest,
payload: web::Json<user_api::GetUserRoleDetailsRequest>,
) -> HttpResponse {
let flow = Flow::GetUserRoleDetails;
Box::pin(api::server_wrap(
flow,
state.clone(),
&req,
payload.into_inn... | crates/router/src/routes/user.rs | router | function_signature | 122 | rust | null | null | null | null | list_user_roles_details | null | null | null | null | null | null | null |
pub async fn create_payout_link_db_entry(
state: &SessionState,
merchant_id: &id_type::MerchantId,
payout_link_data: &PayoutLinkData,
return_url: Option<String>,
) -> RouterResult<PayoutLink> {
let db: &dyn StorageInterface = &*state.store;
let link_data = serde_json::to_value(payout_link_data)... | crates/router/src/core/payouts.rs | router | function_signature | 296 | rust | null | null | null | null | create_payout_link_db_entry | null | null | null | null | null | null | null |
impl api::RefundExecute for Gocardless {} | crates/hyperswitch_connectors/src/connectors/gocardless.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Gocardless | api::RefundExecute for | impl api::RefundExecute for for Gocardless | null | null | null | null | null | null | null | null |
/// High-level abstraction for calling UCS webhook transformation
/// This provides a clean interface similar to payment flow UCS calls
pub async fn call_unified_connector_service_for_webhook(
state: &SessionState,
merchant_context: &MerchantContext,
connector_name: &str,
body: &actix_web::web::Bytes,
... | crates/router/src/core/unified_connector_service.rs | router | function_signature | 847 | rust | null | null | null | null | call_unified_connector_service_for_webhook | 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.