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 ExpiryDate { pub month: Secret<i8>, pub year: Secret<i32>, }
crates/hyperswitch_connectors/src/connectors/worldpay/requests.rs
hyperswitch_connectors
struct_definition
24
rust
ExpiryDate
null
null
null
null
null
null
null
null
null
null
null
pub struct SuccessBasedRoutingConfig { pub params: Option<Vec<DynamicRoutingConfigParams>>, pub config: Option<SuccessBasedRoutingConfigBody>, #[schema(value_type = DecisionEngineSuccessRateData)] pub decision_engine_configs: Option<open_router::DecisionEngineSuccessRateData>, }
crates/api_models/src/routing.rs
api_models
struct_definition
61
rust
SuccessBasedRoutingConfig
null
null
null
null
null
null
null
null
null
null
null
impl Paybox { pub fn new() -> &'static Self { &Self { amount_converter: &MinorUnitForConnector, } } }
crates/hyperswitch_connectors/src/connectors/paybox.rs
hyperswitch_connectors
impl_block
33
rust
null
Paybox
null
impl Paybox
null
null
null
null
null
null
null
null
impl webhooks::IncomingWebhook for Custombilling { fn get_webhook_object_reference_id( &self, _request: &webhooks::IncomingWebhookRequestDetails<'_>, ) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> { Err(report!(errors::ConnectorError::WebhooksNotImplem...
crates/hyperswitch_connectors/src/connectors/custombilling.rs
hyperswitch_connectors
impl_block
210
rust
null
Custombilling
webhooks::IncomingWebhook for
impl webhooks::IncomingWebhook for for Custombilling
null
null
null
null
null
null
null
null
impl ConnectorSpecifications for Mollie {}
crates/hyperswitch_connectors/src/connectors/mollie.rs
hyperswitch_connectors
impl_block
8
rust
null
Mollie
ConnectorSpecifications for
impl ConnectorSpecifications for for Mollie
null
null
null
null
null
null
null
null
pub struct DwollaErrorDetails { pub errors: Vec<DwollaErrorDetail>, }
crates/hyperswitch_connectors/src/connectors/dwolla/transformers.rs
hyperswitch_connectors
struct_definition
19
rust
DwollaErrorDetails
null
null
null
null
null
null
null
null
null
null
null
pub struct HyperswitchVaultAuthType { pub(super) api_key: Secret<String>, pub(super) profile_id: Secret<String>, }
crates/hyperswitch_connectors/src/connectors/hyperswitch_vault/transformers.rs
hyperswitch_connectors
struct_definition
30
rust
HyperswitchVaultAuthType
null
null
null
null
null
null
null
null
null
null
null
pub async fn find_by_org_id( conn: &PgPooledConn, org_id: id_type::OrganizationId, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl_identifier.eq(org_id), ) .await }
crates/diesel_models/src/query/organization.rs
diesel_models
function_signature
72
rust
null
null
null
null
find_by_org_id
null
null
null
null
null
null
null
File: crates/common_utils/src/metrics/utils.rs Public functions: 2 //! metric utility functions use std::time; use router_env::opentelemetry; /// Record the time taken by the future to execute #[inline] pub async fn time_future<F, R>(future: F) -> (R, time::Duration) where F: futures::Future<Output = R>, { ...
crates/common_utils/src/metrics/utils.rs
common_utils
full_file
230
null
null
null
null
null
null
null
null
null
null
null
null
null
File: crates/router/src/db/address.rs use common_utils::{id_type, types::keymanager::KeyManagerState}; use diesel_models::{address::AddressUpdateInternal, enums::MerchantStorageScheme}; use error_stack::ResultExt; use super::MockDb; use crate::{ core::errors::{self, CustomResult}, types::{ domain::{ ...
crates/router/src/db/address.rs
router
full_file
6,504
null
null
null
null
null
null
null
null
null
null
null
null
null
impl api::PaymentsCompleteAuthorize for Payme {}
crates/hyperswitch_connectors/src/connectors/payme.rs
hyperswitch_connectors
impl_block
10
rust
null
Payme
api::PaymentsCompleteAuthorize for
impl api::PaymentsCompleteAuthorize for for Payme
null
null
null
null
null
null
null
null
Documentation: crates/router_derive/README.md # Type: Doc File # `router_derive` Utility macros for the `router` crate.
crates/router_derive/README.md
null
doc_file
31
doc
null
null
null
null
null
null
null
null
null
null
null
null
pub async fn merchant_account_create() {}
crates/openapi/src/routes/merchant_account.rs
openapi
function_signature
8
rust
null
null
null
null
merchant_account_create
null
null
null
null
null
null
null
pub async fn resolve_billing_address_for_payout( state: &SessionState, req_billing: Option<&api_models::payments::Address>, existing_address_id: Option<&String>, payment_method: Option<&hyperswitch_domain_models::payment_methods::PaymentMethod>, merchant_context: &domain::MerchantContext, custom...
crates/router/src/core/payouts/helpers.rs
router
function_signature
801
rust
null
null
null
null
resolve_billing_address_for_payout
null
null
null
null
null
null
null
pub async fn read_string(field: &mut Field) -> Option<String> { let bytes = field.try_next().await; if let Ok(Some(bytes)) = bytes { String::from_utf8(bytes.to_vec()).ok() } else { None } }
crates/router/src/core/files/helpers.rs
router
function_signature
58
rust
null
null
null
null
read_string
null
null
null
null
null
null
null
impl DashboardMetadata { pub async fn update( conn: &PgPooledConn, user_id: Option<String>, merchant_id: id_type::MerchantId, org_id: id_type::OrganizationId, data_key: enums::DashboardMetadata, dashboard_metadata_update: DashboardMetadataUpdate, ) -> StorageResul...
crates/diesel_models/src/query/dashboard_metadata.rs
diesel_models
impl_block
817
rust
null
DashboardMetadata
null
impl DashboardMetadata
null
null
null
null
null
null
null
null
impl api::Payment for Wellsfargopayout {}
crates/hyperswitch_connectors/src/connectors/wellsfargopayout.rs
hyperswitch_connectors
impl_block
11
rust
null
Wellsfargopayout
api::Payment for
impl api::Payment for for Wellsfargopayout
null
null
null
null
null
null
null
null
File: crates/router/src/types/storage/events.rs pub use diesel_models::events::{Event, EventMetadata, EventNew};
crates/router/src/types/storage/events.rs
router
full_file
25
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct WebhookAmount { pub amount: FloatMajorUnit, pub currency: enums::Currency, }
crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs
hyperswitch_connectors
struct_definition
23
rust
WebhookAmount
null
null
null
null
null
null
null
null
null
null
null
pub fn validate(&self) -> Result<(), ApplicationError> { use common_utils::fp_utils::when; #[cfg(feature = "keymanager_mtls")] when( self.enabled && (self.ca.is_default_or_empty() || self.cert.is_default_or_empty()), || { Err(ApplicationError::InvalidConf...
crates/router/src/configs/validations.rs
router
function_signature
129
rust
null
null
null
null
validate
null
null
null
null
null
null
null
File: crates/scheduler/src/consumer/types.rs pub mod batch; pub mod process_data; pub use self::batch::ProcessTrackerBatch;
crates/scheduler/src/consumer/types.rs
scheduler
full_file
30
null
null
null
null
null
null
null
null
null
null
null
null
null
File: crates/router/src/core/payments/operations/payment_create_intent.rs Public structs: 1 use std::marker::PhantomData; use api_models::{enums::FrmSuggestion, payments::PaymentsCreateIntentRequest}; use async_trait::async_trait; use common_utils::{ errors::CustomResult, ext_traits::Encode, types::{auth...
crates/router/src/core/payments/operations/payment_create_intent.rs
router
full_file
2,372
null
null
null
null
null
null
null
null
null
null
null
null
null
impl api::Payment for Deutschebank {}
crates/hyperswitch_connectors/src/connectors/deutschebank.rs
hyperswitch_connectors
impl_block
8
rust
null
Deutschebank
api::Payment for
impl api::Payment for for Deutschebank
null
null
null
null
null
null
null
null
/// Masked serialization. /// /// Trait object for supporting serialization to Value while accounting for masking /// The usual Serde Serialize trait cannot be used as trait objects /// like &dyn Serialize or boxed trait objects like Box<dyn Serialize> because of Rust's "object safety" rules. /// In particular, the tra...
crates/masking/src/serde.rs
masking
trait_definition
134
rust
null
null
ErasedMaskSerialize
null
null
null
null
null
null
null
null
null
pub async fn get_refund_metrics( &self, metric: &RefundMetrics, dimensions: &[RefundDimensions], auth: &AuthInfo, filters: &RefundFilters, granularity: Option<Granularity>, time_range: &TimeRange, ) -> types::MetricsResult<HashSet<(RefundMetricsBucketIdentifie...
crates/analytics/src/lib.rs
analytics
function_signature
573
rust
null
null
null
null
get_refund_metrics
null
null
null
null
null
null
null
impl api::PaymentVoid for Amazonpay {}
crates/hyperswitch_connectors/src/connectors/amazonpay.rs
hyperswitch_connectors
impl_block
9
rust
null
Amazonpay
api::PaymentVoid for
impl api::PaymentVoid for for Amazonpay
null
null
null
null
null
null
null
null
pub struct NordeaGroupHeader { /// Response creation time. Format: date-time. pub creation_date_time: Option<String>, /// HTTP code for response. Format: int32. pub http_code: Option<i32>, /// Original request id for correlation purposes pub message_identification: Option<String>, /// Detail...
crates/hyperswitch_connectors/src/connectors/nordea/responses.rs
hyperswitch_connectors
struct_definition
86
rust
NordeaGroupHeader
null
null
null
null
null
null
null
null
null
null
null
pub fn server(state: AppState) -> Scope { let mut route = web::scope("/payouts").app_data(web::Data::new(state)); route = route.service(web::resource("/create").route(web::post().to(payouts_create))); #[cfg(feature = "olap")] { route = route .service( ...
crates/router/src/routes/app.rs
router
function_signature
345
rust
null
null
null
null
server
null
null
null
null
null
null
null
impl EliminationAnalyserConfig { pub fn update(&mut self, new: Self) { if let Some(bucket_size) = new.bucket_size { self.bucket_size = Some(bucket_size) } if let Some(bucket_leak_interval_in_secs) = new.bucket_leak_interval_in_secs { self.bucket_leak_interval_in_secs ...
crates/api_models/src/routing.rs
api_models
impl_block
85
rust
null
EliminationAnalyserConfig
null
impl EliminationAnalyserConfig
null
null
null
null
null
null
null
null
pub struct HelcimRouterData<T> { pub amount: FloatMajorUnit, pub router_data: T, }
crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs
hyperswitch_connectors
struct_definition
26
rust
HelcimRouterData
null
null
null
null
null
null
null
null
null
null
null
impl common_utils::events::ApiEventMetric for ClientSecretCreateRequest { 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
54
rust
null
ClientSecretCreateRequest
common_utils::events::ApiEventMetric for
impl common_utils::events::ApiEventMetric for for ClientSecretCreateRequest
null
null
null
null
null
null
null
null
impl ConnectorCommon for Stripebilling { fn id(&self) -> &'static str { "stripebilling" } 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, c...
crates/hyperswitch_connectors/src/connectors/stripebilling.rs
hyperswitch_connectors
impl_block
426
rust
null
Stripebilling
ConnectorCommon for
impl ConnectorCommon for for Stripebilling
null
null
null
null
null
null
null
null
pub struct PlacetopayRefundStatusResponse { status: PlacetopayRefundStatus, }
crates/hyperswitch_connectors/src/connectors/placetopay/transformers.rs
hyperswitch_connectors
struct_definition
23
rust
PlacetopayRefundStatusResponse
null
null
null
null
null
null
null
null
null
null
null
pub struct RoutingAlgorithmId { #[schema(value_type = String)] pub routing_algorithm_id: common_utils::id_type::RoutingId, }
crates/api_models/src/routing.rs
api_models
struct_definition
30
rust
RoutingAlgorithmId
null
null
null
null
null
null
null
null
null
null
null
impl PayoutsUpdate { pub fn apply_changeset(self, source: Payouts) -> Payouts { let PayoutsUpdateInternal { amount, destination_currency, source_currency, description, recurring, auto_fulfill, return_url, entity_...
crates/diesel_models/src/payouts.rs
diesel_models
impl_block
315
rust
null
PayoutsUpdate
null
impl PayoutsUpdate
null
null
null
null
null
null
null
null
pub struct Coinbase { amount_convertor: &'static (dyn AmountConvertor<Output = StringMajorUnit> + Sync), }
crates/hyperswitch_connectors/src/connectors/coinbase.rs
hyperswitch_connectors
struct_definition
27
rust
Coinbase
null
null
null
null
null
null
null
null
null
null
null
pub struct Config { pub key: String, pub config: String, }
crates/diesel_models/src/configs.rs
diesel_models
struct_definition
17
rust
Config
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.NetworkTransactionIdAndCardDetails { "type": "object", "required": [ "card_number", "card_exp_month", "card_exp_year", "card_holder_name", "network_transaction_id" ], "properties": { "card_number": { "type": "string", "description": "The...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
487
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "NetworkTransactionIdAndCardDetails" ]
null
null
null
null
pub struct PayoutCreateResponse { /// Unique identifier for the payout. This ensures idempotency for multiple payouts /// that have been done by a single merchant. This field is auto generated and is returned in the API response. #[schema( value_type = String, min_length = 30, max_le...
crates/api_models/src/payouts.rs
api_models
struct_definition
2,140
rust
PayoutCreateResponse
null
null
null
null
null
null
null
null
null
null
null
pub async fn update_decision_engine_dynamic_routing_setup( state: &SessionState, profile_id: &id_type::ProfileId, request: serde_json::Value, dynamic_routing_type: routing_types::DynamicRoutingType, dynamic_routing_algo_ref: &mut routing_types::DynamicRoutingAlgorithmRef, ) -> RouterResult<()> { ...
crates/router/src/core/routing/helpers.rs
router
function_signature
600
rust
null
null
null
null
update_decision_engine_dynamic_routing_setup
null
null
null
null
null
null
null
pub struct GsmCreateRequest { /// The connector through which payment has gone through #[schema(value_type = Connector)] pub connector: api_enums::Connector, /// The flow in which the code and message occurred for a connector pub flow: String, /// The sub_flow in which the code and message occur...
crates/api_models/src/gsm.rs
api_models
struct_definition
494
rust
GsmCreateRequest
null
null
null
null
null
null
null
null
null
null
null
File: crates/router/tests/connectors/phonepe.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 PhonepeTest; im...
crates/router/tests/connectors/phonepe.rs
router
full_file
2,926
null
null
null
null
null
null
null
null
null
null
null
null
null
pub fn from_redis_stream_entry( entry: HashMap<String, Option<String>>, ) -> CustomResult<Self, errors::ProcessTrackerError> { let mut entry = entry; let id = entry .remove("id") .flatten() .get_required_value("id") .change_context(errors::Proc...
crates/scheduler/src/consumer/types/batch.rs
scheduler
function_signature
561
rust
null
null
null
null
from_redis_stream_entry
null
null
null
null
null
null
null
pub fn mobile_payment_next_steps_check( payment_attempt: &storage::PaymentAttempt, ) -> RouterResult<Option<api_models::payments::MobilePaymentNextStepData>> { let mobile_payment_next_step = if let Some(diesel_models::enums::PaymentMethod::MobilePayment) = payment_attempt.payment_method { le...
crates/router/src/core/payments/transformers.rs
router
function_signature
185
rust
null
null
null
null
mobile_payment_next_steps_check
null
null
null
null
null
null
null
pub async fn sync_onboarding_status( state: web::Data<AppState>, http_req: HttpRequest, json_payload: web::Json<api_types::OnboardingSyncRequest>, ) -> HttpResponse { let flow = Flow::SyncOnboardingStatus; let req_payload = json_payload.into_inner(); Box::pin(api::server_wrap( flow.clone...
crates/router/src/routes/connector_onboarding.rs
router
function_signature
135
rust
null
null
null
null
sync_onboarding_status
null
null
null
null
null
null
null
pub async fn validate_request_and_locker_reference_and_customer( &self, payment_method: &domain::PaymentMethod, ) -> RouterResult<(String, api::CustomerDetails)> { // Ensure customer ID matches let customer_id_in_req = self .customer .customer_id ....
crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs
router
function_signature
597
rust
null
null
null
null
validate_request_and_locker_reference_and_customer
null
null
null
null
null
null
null
pub struct CardInfoUpdate;
crates/router/src/core/cards_info.rs
router
struct_definition
6
rust
CardInfoUpdate
null
null
null
null
null
null
null
null
null
null
null
pub struct StripePaymentIntentListResponse { pub object: String, pub url: String, pub has_more: bool, pub data: Vec<StripePaymentIntentResponse>, }
crates/router/src/compatibility/stripe/payment_intents/types.rs
router
struct_definition
39
rust
StripePaymentIntentListResponse
null
null
null
null
null
null
null
null
null
null
null
impl DecisionEngineApiHandler for ConfigApiClient { async fn send_decision_engine_request<Req, Res>( state: &SessionState, http_method: services::Method, path: &str, request_body: Option<Req>, timeout: Option<u64>, events_wrapper: Option<RoutingEventsWrapper<Req>>, ...
crates/router/src/core/payments/routing/utils.rs
router
impl_block
279
rust
null
ConfigApiClient
DecisionEngineApiHandler for
impl DecisionEngineApiHandler for for ConfigApiClient
null
null
null
null
null
null
null
null
- **router:** Validate payment method type in payments request against given payment method data for non-card flows ([#1236](https://github.com/juspay/hyperswitch/pull/1236)) ([`7607b6b`](https://github.com/juspay/hyperswitch/commit/7607b6b67153fce1e965d7ef7e41c62380884d8f)) ### Bug Fixes - **Connector:** [Noon] Upda...
CHANGELOG.md#chunk55
null
doc_chunk
8,155
doc
null
null
null
null
null
null
null
null
null
null
null
null
impl ConnectorValidation for Hyperwallet { fn validate_mandate_payment( &self, _pm_type: Option<enums::PaymentMethodType>, pm_data: PaymentMethodData, ) -> CustomResult<(), errors::ConnectorError> { match pm_data { PaymentMethodData::Card(_) => Err(errors::ConnectorEr...
crates/hyperswitch_connectors/src/connectors/hyperwallet.rs
hyperswitch_connectors
impl_block
179
rust
null
Hyperwallet
ConnectorValidation for
impl ConnectorValidation for for Hyperwallet
null
null
null
null
null
null
null
null
impl ConnectorAccessToken for Payone {}
crates/hyperswitch_connectors/src/connectors/payone.rs
hyperswitch_connectors
impl_block
7
rust
null
Payone
ConnectorAccessToken for
impl ConnectorAccessToken for for Payone
null
null
null
null
null
null
null
null
pub async fn routing_retrieve_linked_config( state: web::Data<AppState>, req: HttpRequest, query: web::Query<RoutingRetrieveQuery>, path: web::Path<common_utils::id_type::ProfileId>, transaction_type: &enums::TransactionType, ) -> impl Responder { use crate::services::authentication::Authenticat...
crates/router/src/routes/routing.rs
router
function_signature
356
rust
null
null
null
null
routing_retrieve_linked_config
null
null
null
null
null
null
null
pub fn populate_browser_info( req: &actix_web::HttpRequest, payload: &mut api::PaymentsRequest, header_payload: &hyperswitch_domain_models::payments::HeaderPayload, ) -> RouterResult<()> { let mut browser_info: types::BrowserInformation = payload .browser_info .clone() .map(|v| v...
crates/router/src/routes/payments/helpers.rs
router
function_signature
558
rust
null
null
null
null
populate_browser_info
null
null
null
null
null
null
null
pub async fn create_payment_method( &self, stored_locker_resp: &StoreLockerResponse, network_token_details: &NetworkTokenizationResponse, card_details: &domain::CardDetail, customer_id: &id_type::CustomerId, ) -> RouterResult<domain::PaymentMethod> { let payment_metho...
crates/router/src/core/payment_methods/tokenize/card_executor.rs
router
function_signature
599
rust
null
null
null
null
create_payment_method
null
null
null
null
null
null
null
pub async fn find_by_id( conn: &PgPooledConn, id: &common_utils::id_type::GlobalAttemptId, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::id.eq(id.to_owned()), ) .await }
crates/diesel_models/src/query/payment_attempt.rs
diesel_models
function_signature
77
rust
null
null
null
null
find_by_id
null
null
null
null
null
null
null
impl Health { pub fn server(state: AppState) -> Scope { web::scope("health") .app_data(web::Data::new(state)) .service(web::resource("").route(web::get().to(health))) .service(web::resource("/ready").route(web::get().to(deep_health_check))) } }
crates/router/src/routes/app.rs
router
impl_block
71
rust
null
Health
null
impl Health
null
null
null
null
null
null
null
null
pub struct CardReqBodyV2 { pub merchant_id: id_type::MerchantId, pub merchant_customer_id: String, // Not changing this as it might lead to api contract failure pub card_reference: String, }
crates/router/src/core/payment_methods/transformers.rs
router
struct_definition
48
rust
CardReqBodyV2
null
null
null
null
null
null
null
null
null
null
null
pub trait AccessToken { async fn access_token(state: &SessionState) -> RouterResult<oss_types::AccessToken>; }
crates/router/src/core/connector_onboarding.rs
router
trait_definition
25
rust
null
null
AccessToken
null
null
null
null
null
null
null
null
null
impl ConnectorSpecifications for Powertranz { fn get_connector_about(&self) -> Option<&'static ConnectorInfo> { Some(&POWERTRANZ_CONNECTOR_INFO) } fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> { Some(&*POWERTRANZ_SUPPORTED_PAYMENT_METHODS) } fn...
crates/hyperswitch_connectors/src/connectors/powertranz.rs
hyperswitch_connectors
impl_block
109
rust
null
Powertranz
ConnectorSpecifications for
impl ConnectorSpecifications for for Powertranz
null
null
null
null
null
null
null
null
pub struct ZenMerchantAction { action: ZenActions, data: ZenMerchantActionData, }
crates/hyperswitch_connectors/src/connectors/zen/transformers.rs
hyperswitch_connectors
struct_definition
21
rust
ZenMerchantAction
null
null
null
null
null
null
null
null
null
null
null
pub struct BucketInformationEventResponse { pub is_eliminated: bool, pub bucket_name: Vec<String>, }
crates/router/src/core/payments/routing/utils.rs
router
struct_definition
24
rust
BucketInformationEventResponse
null
null
null
null
null
null
null
null
null
null
null
pub fn is_dispute_event(event_code: &AirwallexWebhookEventType) -> bool { matches!( event_code, AirwallexWebhookEventType::DisputeAccepted | AirwallexWebhookEventType::DisputePreChargebackAccepted | AirwallexWebhookEventType::DisputeRespondedByMerchant | Airwallex...
crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs
hyperswitch_connectors
function_signature
99
rust
null
null
null
null
is_dispute_event
null
null
null
null
null
null
null
/// Try and get the variants for an enum pub fn try_get_enum_variant( input: syn::DeriveInput, ) -> Result<proc_macro2::TokenStream, syn::Error> { let name = &input.ident; let parsed_error_type = input.get_metadata()?; let (error_type, error_variant) = parsed_error_type .first() .ok_or(...
crates/router_derive/src/macros/try_get_enum.rs
router_derive
function_signature
384
rust
null
null
null
null
try_get_enum_variant
null
null
null
null
null
null
null
File: crates/drainer/src/main.rs use std::collections::HashMap; use drainer::{errors::DrainerResult, logger, services, settings, start_drainer, start_web_server}; use router_env::tracing::Instrument; #[tokio::main] async fn main() -> DrainerResult<()> { // Get configuration let cmd_line = <settings::CmdLineC...
crates/drainer/src/main.rs
drainer
full_file
449
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct NexixpayRSyncResponse { order_id: String, operation_id: String, operation_result: NexixpayRefundResultStatus, operation_type: NexixpayRefundOperationType, }
crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs
hyperswitch_connectors
struct_definition
46
rust
NexixpayRSyncResponse
null
null
null
null
null
null
null
null
null
null
null
pub fn delete_evidence_file( dispute_evidence: DisputeEvidence, evidence_type: EvidenceType, ) -> DisputeEvidence { match evidence_type { EvidenceType::CancellationPolicy => DisputeEvidence { cancellation_policy: None, ..dispute_evidence }, EvidenceType::Custo...
crates/router/src/core/disputes/transformers.rs
router
function_signature
312
rust
null
null
null
null
delete_evidence_file
null
null
null
null
null
null
null
File: crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs Public structs: 28 use common_enums::enums::{AttemptStatus, BankNames, CaptureMethod, CountryAlpha2, Currency}; use common_utils::{pii::Email, request::Method}; use hyperswitch_domain_models::{ payment_method_data::{BankRedirectData, Pay...
crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs
hyperswitch_connectors
full_file
5,698
null
null
null
null
null
null
null
null
null
null
null
null
null
pub fn is_disabled(&self) -> bool { self.disabled.unwrap_or(false) }
crates/hyperswitch_domain_models/src/merchant_connector_account.rs
hyperswitch_domain_models
function_signature
19
rust
null
null
null
null
is_disabled
null
null
null
null
null
null
null
pub trait GsmValidation<F: Send + Clone + Sync, FData: Send + Sync, Resp> { // TODO : move this function to appropriate place later. fn should_call_gsm(&self) -> bool; }
crates/router/src/core/payments/retry.rs
router
trait_definition
48
rust
null
null
GsmValidation
null
null
null
null
null
null
null
null
null
let val = secret_val .into_iter() .map(|secret| secret.expose()) .collect(); serde_json::Value::Array(val) .parse_value("PaymentMethods") .change_context(errors::ApiErrorResponse::Internal...
crates/router/src/types/transformers.rs#chunk1
router
chunk
8,183
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct SignifydPaymentsResponse { signifyd_id: i64, order_id: String, decision: Decision, }
crates/hyperswitch_connectors/src/connectors/signifyd/transformers/api.rs
hyperswitch_connectors
struct_definition
29
rust
SignifydPaymentsResponse
null
null
null
null
null
null
null
null
null
null
null
pub struct RefundStatusDetails { state: RefundStatus, reason_code: Option<String>, reason_description: Option<String>, last_updated_timestamp: String, }
crates/hyperswitch_connectors/src/connectors/amazonpay/transformers.rs
hyperswitch_connectors
struct_definition
36
rust
RefundStatusDetails
null
null
null
null
null
null
null
null
null
null
null
pub struct WebhookEvent { pub resource_type: WebhookResourceType, pub action: WebhookAction, pub links: WebhooksLink, }
crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs
hyperswitch_connectors
struct_definition
33
rust
WebhookEvent
null
null
null
null
null
null
null
null
null
null
null
pub struct ChargebeePaymentsRequest { amount: MinorUnit, card: ChargebeeCard, }
crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs
hyperswitch_connectors
struct_definition
21
rust
ChargebeePaymentsRequest
null
null
null
null
null
null
null
null
null
null
null
pub struct AverageAccumulator { pub total: u32, pub count: u32, }
crates/analytics/src/payments/accumulator.rs
analytics
struct_definition
24
rust
AverageAccumulator
null
null
null
null
null
null
null
null
null
null
null
pub struct PayloadCardsRequestData { pub amount: StringMajorUnit, #[serde(flatten)] pub card: PayloadCard, #[serde(rename = "type")] pub transaction_types: TransactionTypes, // For manual capture, set status to "authorized", otherwise omit #[serde(skip_serializing_if = "Option::is_none")] ...
crates/hyperswitch_connectors/src/connectors/payload/requests.rs
hyperswitch_connectors
struct_definition
180
rust
PayloadCardsRequestData
null
null
null
null
null
null
null
null
null
null
null
File: crates/router/tests/connectors/coingate.rs use masking::Secret; use router::types::{self, api, storage::enums}; use crate::utils::{self, ConnectorActions}; use test_utils::connector_auth; #[derive(Clone, Copy)] struct CoingateTest; impl ConnectorActions for CoingateTest {} impl utils::Connector for CoingateTes...
crates/router/tests/connectors/coingate.rs
router
full_file
2,946
null
null
null
null
null
null
null
null
null
null
null
null
null
impl State for PmFetched {}
crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs
router
impl_block
8
rust
null
PmFetched
State for
impl State for for PmFetched
null
null
null
null
null
null
null
null
pub struct TaxjarCard { number: cards::CardNumber, expiry_month: Secret<String>, expiry_year: Secret<String>, cvc: Secret<String>, complete: bool, }
crates/hyperswitch_connectors/src/connectors/taxjar/transformers.rs
hyperswitch_connectors
struct_definition
41
rust
TaxjarCard
null
null
null
null
null
null
null
null
null
null
null
pub struct PaymentsMandateReferenceRecord { pub connector_mandate_id: String, pub payment_method_type: Option<common_enums::PaymentMethodType>, pub original_payment_authorized_amount: Option<i64>, pub original_payment_authorized_currency: Option<common_enums::Currency>, }
crates/api_models/src/payment_methods.rs
api_models
struct_definition
65
rust
PaymentsMandateReferenceRecord
null
null
null
null
null
null
null
null
null
null
null
pub fn get_verification_days_left( state: &SessionState, user: &UserFromStorage, ) -> UserResult<Option<i64>> { #[cfg(feature = "email")] return user.get_verification_days_left(state); #[cfg(not(feature = "email"))] return Ok(None); }
crates/router/src/utils/user.rs
router
function_signature
65
rust
null
null
null
null
get_verification_days_left
null
null
null
null
null
null
null
pub struct GlobalpayWebhookObjectId { pub id: String, }
crates/hyperswitch_connectors/src/connectors/globalpay/response.rs
hyperswitch_connectors
struct_definition
15
rust
GlobalpayWebhookObjectId
null
null
null
null
null
null
null
null
null
null
null
pub struct RuleMigrationResult { pub success: Vec<RuleMigrationResponse>, pub errors: Vec<RuleMigrationError>, }
crates/api_models/src/routing.rs
api_models
struct_definition
27
rust
RuleMigrationResult
null
null
null
null
null
null
null
null
null
null
null
impl Katapult { pub fn new() -> &'static Self { &Self { amount_converter: &StringMinorUnitForConnector, } } }
crates/hyperswitch_connectors/src/connectors/katapult.rs
hyperswitch_connectors
impl_block
34
rust
null
Katapult
null
impl Katapult
null
null
null
null
null
null
null
null
impl<const T: u8> Payment for DummyConnector<T> {}
crates/hyperswitch_connectors/src/connectors/dummyconnector.rs
hyperswitch_connectors
impl_block
14
rust
null
DummyConnector
Payment for
impl Payment for for DummyConnector
null
null
null
null
null
null
null
null
/// Checks if retry with PAN is possible. pub fn is_clear_pan_possible(&self) -> bool { self.clear_pan_possible }
crates/common_types/src/domain.rs
common_types
function_signature
30
rust
null
null
null
null
is_clear_pan_possible
null
null
null
null
null
null
null
impl ConnectorSpecifications for UnifiedAuthenticationService {}
crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs
hyperswitch_connectors
impl_block
8
rust
null
UnifiedAuthenticationService
ConnectorSpecifications for
impl ConnectorSpecifications for for UnifiedAuthenticationService
null
null
null
null
null
null
null
null
impl api::PaymentVoid for Boku {}
crates/hyperswitch_connectors/src/connectors/boku.rs
hyperswitch_connectors
impl_block
9
rust
null
Boku
api::PaymentVoid for
impl api::PaymentVoid for for Boku
null
null
null
null
null
null
null
null
pub async fn get_payout_method_data_from_temporary_locker( state: &routes::SessionState, lookup_key: &str, merchant_key_store: &domain::MerchantKeyStore, ) -> RouterResult<(Option<api::PayoutMethodData>, SupplementaryVaultData)> { let de_tokenize = get_tokenized_data(stat...
crates/router/src/core/payment_methods/vault.rs
router
function_signature
158
rust
null
null
null
null
get_payout_method_data_from_temporary_locker
null
null
null
null
null
null
null
Documentation: api-reference/v2/profile/profile--deactivate-routing-algorithm.mdx # Type: Doc File --- openapi: patch /v2/profiles/{id}/deactivate-routing-algorithm ---
api-reference/v2/profile/profile--deactivate-routing-algorithm.mdx
null
doc_file
43
doc
null
null
null
null
null
null
null
null
null
null
null
null
impl api::PaymentToken for Bluesnap {}
crates/hyperswitch_connectors/src/connectors/bluesnap.rs
hyperswitch_connectors
impl_block
9
rust
null
Bluesnap
api::PaymentToken for
impl api::PaymentToken for for Bluesnap
null
null
null
null
null
null
null
null
impl api::PaymentAuthorize for Phonepe {}
crates/hyperswitch_connectors/src/connectors/phonepe.rs
hyperswitch_connectors
impl_block
9
rust
null
Phonepe
api::PaymentAuthorize for
impl api::PaymentAuthorize for for Phonepe
null
null
null
null
null
null
null
null
impl api::ExternalVaultRetrieve for Vgs {}
crates/hyperswitch_connectors/src/connectors/vgs.rs
hyperswitch_connectors
impl_block
10
rust
null
Vgs
api::ExternalVaultRetrieve for
impl api::ExternalVaultRetrieve for for Vgs
null
null
null
null
null
null
null
null
Documentation: api-reference/v1/payments/payments--create.mdx # Type: Doc File --- openapi: post /payments --- <Tip> Use the dropdown on the top right corner of the code snippet to try out different payment scenarios. </Tip>
api-reference/v1/payments/payments--create.mdx
null
doc_file
55
doc
null
null
null
null
null
null
null
null
null
null
null
null
impl api::MandateSetup for Gpayments {}
crates/hyperswitch_connectors/src/connectors/gpayments.rs
hyperswitch_connectors
impl_block
11
rust
null
Gpayments
api::MandateSetup for
impl api::MandateSetup for for Gpayments
null
null
null
null
null
null
null
null
pub fn convert_forex_value(amount: i64, from_currency: JsValue, to_currency: JsValue) -> JsResult { let forex_data = SEED_FOREX .get() .ok_or("Forex Data not seeded") .err_to_js()?; let from_currency: common_enums::Currency = serde_wasm_bindgen::from_value(from_currency)?; let to_cur...
crates/euclid_wasm/src/lib.rs
euclid_wasm
function_signature
161
rust
null
null
null
null
convert_forex_value
null
null
null
null
null
null
null
pub struct NoonPaymentsOrderResponse { status: NoonPaymentStatus, id: u64, error_code: u64, error_message: Option<String>, reference: Option<String>, }
crates/hyperswitch_connectors/src/connectors/noon/transformers.rs
hyperswitch_connectors
struct_definition
43
rust
NoonPaymentsOrderResponse
null
null
null
null
null
null
null
null
null
null
null
impl ConnectorSpecifications for Paytm { fn get_connector_about(&self) -> Option<&'static ConnectorInfo> { Some(&*PAYTM_CONNECTOR_INFO) } fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> { Some(&*PAYTM_SUPPORTED_PAYMENT_METHODS) } fn get_supported...
crates/hyperswitch_connectors/src/connectors/paytm.rs
hyperswitch_connectors
impl_block
107
rust
null
Paytm
ConnectorSpecifications for
impl ConnectorSpecifications for for Paytm
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.ApplePayAddressParameters { "type": "string", "enum": [ "postalAddress", "phone", "email" ] }
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
43
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "ApplePayAddressParameters" ]
null
null
null
null