id stringlengths 20 153 | type stringclasses 1
value | granularity stringclasses 14
values | content stringlengths 16 84.3k | metadata dict |
|---|---|---|---|---|
hyperswitch_method_api_models_DynamicRoutingAlgorithmRef_is_elimination_enabled | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for DynamicRoutingAlgorithmRef
pub fn is_elimination_enabled(&self) -> bool {
self.elimination_routing_algorithm
.as_ref()
.map(|elimination_routing| {
elimination_routing.enabled_feature
== Dyna... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "DynamicRoutingAlgorithmRef",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "is_elimination_enabled",
"num_enums": null,
"num_items": null,
"num_structs": null,
... |
hyperswitch_method_api_models_RoutingType_is_dynamic_routing | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for RoutingType
pub fn is_dynamic_routing(self) -> bool {
self == Self::Dynamic
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RoutingType",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "is_dynamic_routing",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitc... |
hyperswitch_method_api_models_SuccessBasedAlgorithm_update_enabled_features | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for SuccessBasedAlgorithm
pub fn update_enabled_features(&mut self, feature_to_enable: DynamicRoutingFeatures) {
self.enabled_feature = feature_to_enable
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "SuccessBasedAlgorithm",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "update_enabled_features",
"num_enums": null,
"num_items": null,
"num_structs": null,
"rep... |
hyperswitch_method_api_models_DynamicRoutingAlgorithmRef_update_algorithm_id | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for DynamicRoutingAlgorithmRef
pub fn update_algorithm_id(
&mut self,
new_id: common_utils::id_type::RoutingId,
enabled_feature: DynamicRoutingFeatures,
dynamic_routing_type: DynamicRoutingType,
) {
match dynamic_routin... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "DynamicRoutingAlgorithmRef",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "update_algorithm_id",
"num_enums": null,
"num_items": null,
"num_structs": null,
"re... |
hyperswitch_method_api_models_DynamicRoutingAlgorithmRef_update_feature | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for DynamicRoutingAlgorithmRef
pub fn update_feature(
&mut self,
enabled_feature: DynamicRoutingFeatures,
dynamic_routing_type: DynamicRoutingType,
) {
match dynamic_routing_type {
DynamicRoutingType::SuccessRateBas... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "DynamicRoutingAlgorithmRef",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "update_feature",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": ... |
hyperswitch_method_api_models_DynamicRoutingAlgorithmRef_disable_algorithm_id | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for DynamicRoutingAlgorithmRef
pub fn disable_algorithm_id(&mut self, dynamic_routing_type: DynamicRoutingType) {
match dynamic_routing_type {
DynamicRoutingType::SuccessRateBasedRouting => {
if let Some(success_based_algo) = &... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "DynamicRoutingAlgorithmRef",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "disable_algorithm_id",
"num_enums": null,
"num_items": null,
"num_structs": null,
"r... |
hyperswitch_method_api_models_SuccessBasedRoutingConfig_open_router_config_default | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for SuccessBasedRoutingConfig
pub fn open_router_config_default() -> Self {
Self {
params: None,
config: None,
decision_engine_configs: Some(open_router::DecisionEngineSuccessRateData {
default_latency_t... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "SuccessBasedRoutingConfig",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "open_router_config_default",
"num_enums": null,
"num_items": null,
"num_structs": null,... |
hyperswitch_method_api_models_SuccessBasedRoutingConfig_get_decision_engine_configs | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for SuccessBasedRoutingConfig
pub fn get_decision_engine_configs(
&self,
) -> Result<open_router::DecisionEngineSuccessRateData, error_stack::Report<ValidationError>>
{
self.decision_engine_configs
.clone()
.ok_or(e... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "SuccessBasedRoutingConfig",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_decision_engine_configs",
"num_enums": null,
"num_items": null,
"num_structs": null... |
hyperswitch_method_api_models_LabelInformation_update_target_time | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for LabelInformation
pub fn update_target_time(&mut self, new: &Self) {
self.target_time = new.target_time;
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "LabelInformation",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "update_target_time",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyper... |
hyperswitch_method_api_models_LabelInformation_update_target_count | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for LabelInformation
pub fn update_target_count(&mut self, new: &Self) {
self.target_count = new.target_count;
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "LabelInformation",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "update_target_count",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hype... |
hyperswitch_method_api_models_ContractBasedRoutingConfigBody_update | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for ContractBasedRoutingConfigBody
pub fn update(&mut self, new: Self) {
if let Some(new_cons) = new.constants {
self.constants = Some(new_cons)
}
if let Some(new_time_scale) = new.time_scale {
self.time_scale = Som... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ContractBasedRoutingConfigBody",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "update",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyp... |
hyperswitch_method_api_models_RoutingApproach_from_decision_engine_approach | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for RoutingApproach
pub fn from_decision_engine_approach(approach: &str) -> Self {
match approach {
"SR_SELECTION_V3_ROUTING" => Self::Exploitation,
"SR_V3_HEDGING" => Self::Exploration,
_ => Self::Default,
}
... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RoutingApproach",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "from_decision_engine_approach",
"num_enums": null,
"num_items": null,
"num_structs": null,
"rep... |
hyperswitch_method_api_models_RoutingApproach_from_decision_engine_approach | clm | method | // hyperswitch/crates/router/src/core/payments/routing/utils.rs
// impl for RoutingApproach
pub fn from_decision_engine_approach(approach: &str) -> Self {
match approach {
"SR_SELECTION_V3_ROUTING" => Self::Exploitation,
"SR_V3_HEDGING" => Self::Exploration,
_ => Self::Defau... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RoutingApproach",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "from_decision_engine_approach",
"num_enums": null,
"num_items": null,
"num_structs": null,
"rep... |
hyperswitch_method_api_models_RuleMigrationQuery_validated_limit | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for RuleMigrationQuery
pub fn validated_limit(&self) -> u32 {
self.limit.unwrap_or(50).min(1000)
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RuleMigrationQuery",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "validated_limit",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hypers... |
hyperswitch_method_api_models_RuleMigrationResponse_new | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for RuleMigrationResponse
pub fn new(
profile_id: common_utils::id_type::ProfileId,
euclid_algorithm_id: common_utils::id_type::RoutingId,
decision_engine_algorithm_id: String,
is_active_rule: bool,
) -> Self {
Self {
... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RuleMigrationResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
hyperswitch_method_api_models_curringDetails {__network_transaction_id_and_card_details_flow(s | clm | method | // hyperswitch/crates/api_models/src/mandates.rs
// impl for curringDetails {
b fn is_network_transaction_id_and_card_details_flow(self) -> bool {
matches!(self, Self::NetworkTransactionIdAndCardDetails(_))
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "curringDetails {",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "_network_transaction_id_and_card_details_flow(s",
"num_enums": null,
"num_items": null,
"num_str... |
hyperswitch_method_api_models_TotalEventsResponse_new | clm | method | // hyperswitch/crates/api_models/src/webhook_events.rs
// impl for TotalEventsResponse
pub fn new(total_count: i64, events: Vec<EventListItemResponse>) -> Self {
Self {
events,
total_count,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "TotalEventsResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"... |
hyperswitch_method_api_models_MerchantAccountCreate_get_merchant_reference_id | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantAccountCreate
pub fn get_merchant_reference_id(&self) -> id_type::MerchantId {
id_type::MerchantId::from_merchant_name(self.merchant_name.clone().expose())
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantAccountCreate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_merchant_reference_id",
"num_enums": null,
"num_items": null,
"num_structs": null,
"r... |
hyperswitch_method_api_models_MerchantAccountCreate_get_payment_response_hash_key | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantAccountCreate
pub fn get_payment_response_hash_key(&self) -> Option<String> {
self.payment_response_hash_key.clone().or(Some(
common_utils::crypto::generate_cryptographically_secure_random_string(64),
))
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantAccountCreate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_payment_response_hash_key",
"num_enums": null,
"num_items": null,
"num_structs": null,
... |
hyperswitch_method_api_models_MerchantAccountCreate_get_merchant_reference_id | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantAccountCreate
pub fn get_merchant_reference_id(&self) -> id_type::MerchantId {
id_type::MerchantId::from_merchant_name(self.merchant_name.clone().expose())
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantAccountCreate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_merchant_reference_id",
"num_enums": null,
"num_items": null,
"num_structs": null,
"r... |
hyperswitch_method_api_models_MerchantAccountUpdate_get_primary_details_as_value | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantAccountUpdate
pub fn get_primary_details_as_value(
&self,
) -> CustomResult<Option<serde_json::Value>, errors::ParsingError> {
self.primary_business_details
.as_ref()
.map(|primary_business_details| primary_bu... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantAccountUpdate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_primary_details_as_value",
"num_enums": null,
"num_items": null,
"num_structs": null,
... |
hyperswitch_method_api_models_MerchantAccountUpdate_get_pm_link_config_as_value | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantAccountUpdate
pub fn get_pm_link_config_as_value(
&self,
) -> CustomResult<Option<serde_json::Value>, errors::ParsingError> {
self.pm_collect_link_config
.as_ref()
.map(|pm_collect_link_config| pm_collect_link... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantAccountUpdate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_pm_link_config_as_value",
"num_enums": null,
"num_items": null,
"num_structs": null,
... |
hyperswitch_method_api_models_MerchantAccountUpdate_get_merchant_details_as_secret | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantAccountUpdate
pub fn get_merchant_details_as_secret(
&self,
) -> CustomResult<Option<pii::SecretSerdeValue>, errors::ParsingError> {
self.merchant_details
.as_ref()
.map(|merchant_details| merchant_details.enc... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantAccountUpdate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_merchant_details_as_secret",
"num_enums": null,
"num_items": null,
"num_structs": null,... |
hyperswitch_method_api_models_MerchantAccountUpdate_get_metadata_as_secret | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantAccountUpdate
pub fn get_metadata_as_secret(
&self,
) -> CustomResult<Option<pii::SecretSerdeValue>, errors::ParsingError> {
self.metadata
.as_ref()
.map(|metadata| metadata.encode_to_value().map(Secret::new))... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantAccountUpdate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_metadata_as_secret",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo... |
hyperswitch_method_api_models_MerchantAccountUpdate_parse_routing_algorithm | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantAccountUpdate
pub fn parse_routing_algorithm(&self) -> CustomResult<(), errors::ParsingError> {
match self.routing_algorithm {
Some(ref routing_algorithm) => {
let _: routing::StaticRoutingAlgorithm = routing_algorith... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantAccountUpdate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "parse_routing_algorithm",
"num_enums": null,
"num_items": null,
"num_structs": null,
"rep... |
hyperswitch_method_api_models_MerchantAccountUpdate_get_enable_payment_response_hash | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantAccountUpdate
pub fn get_enable_payment_response_hash(&self) -> bool {
self.enable_payment_response_hash.unwrap_or(true)
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantAccountUpdate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_enable_payment_response_hash",
"num_enums": null,
"num_items": null,
"num_structs": nul... |
hyperswitch_method_api_models_MerchantAccountUpdate_get_webhook_details_as_value | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantAccountUpdate
pub fn get_webhook_details_as_value(
&self,
) -> CustomResult<Option<serde_json::Value>, errors::ParsingError> {
self.webhook_details
.as_ref()
.map(|webhook_details| webhook_details.encode_to_va... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantAccountUpdate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_webhook_details_as_value",
"num_enums": null,
"num_items": null,
"num_structs": null,
... |
hyperswitch_method_api_models_MerchantAccountUpdate_get_merchant_details_as_secret | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantAccountUpdate
pub fn get_merchant_details_as_secret(
&self,
) -> CustomResult<Option<pii::SecretSerdeValue>, errors::ParsingError> {
self.merchant_details
.as_ref()
.map(|merchant_details| merchant_details.enc... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantAccountUpdate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_merchant_details_as_secret",
"num_enums": null,
"num_items": null,
"num_structs": null,... |
hyperswitch_method_api_models_MerchantAccountUpdate_get_metadata_as_secret | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantAccountUpdate
pub fn get_metadata_as_secret(
&self,
) -> CustomResult<Option<pii::SecretSerdeValue>, errors::ParsingError> {
self.metadata
.as_ref()
.map(|metadata| metadata.encode_to_value().map(Secret::new))... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantAccountUpdate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_metadata_as_secret",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo... |
hyperswitch_method_api_models_MerchantConnectorCreate_get_transaction_type | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantConnectorCreate
pub fn get_transaction_type(&self) -> api_enums::TransactionType {
match self.connector_type {
#[cfg(feature = "payouts")]
api_enums::ConnectorType::PayoutProcessor => api_enums::TransactionType::Payout,
... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantConnectorCreate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_transaction_type",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo... |
hyperswitch_method_api_models_MerchantConnectorCreate_get_connector_label | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantConnectorCreate
pub fn get_connector_label(&self, profile_name: String) -> String {
match self.connector_label.clone() {
Some(connector_label) => connector_label,
None => format!("{}_{}", self.connector_name, profile_name... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantConnectorCreate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_connector_label",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo"... |
hyperswitch_method_api_models_MerchantConnectorCreate_get_transaction_type | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantConnectorCreate
pub fn get_transaction_type(&self) -> api_enums::TransactionType {
match self.connector_type {
#[cfg(feature = "payouts")]
api_enums::ConnectorType::PayoutProcessor => api_enums::TransactionType::Payout,
... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantConnectorCreate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_transaction_type",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo... |
hyperswitch_method_api_models_MerchantConnectorInfo_new | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantConnectorInfo
pub fn new(
connector_label: String,
merchant_connector_id: id_type::MerchantConnectorAccountId,
) -> Self {
Self {
connector_label,
merchant_connector_id,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantConnectorInfo",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
hyperswitch_method_api_models_MerchantConnectorListResponse_to_merchant_connector_info | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantConnectorListResponse
pub fn to_merchant_connector_info(&self, connector_label: &String) -> MerchantConnectorInfo {
MerchantConnectorInfo {
connector_label: connector_label.to_string(),
merchant_connector_id: self.id.clon... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantConnectorListResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "to_merchant_connector_info",
"num_enums": null,
"num_items": null,
"num_structs": n... |
hyperswitch_method_api_models_MerchantConnectorListResponse_get_connector_name | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantConnectorListResponse
pub fn get_connector_name(&self) -> common_enums::connector_enums::Connector {
self.connector_name
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantConnectorListResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_connector_name",
"num_enums": null,
"num_items": null,
"num_structs": null,
"... |
hyperswitch_method_api_models_MerchantConnectorListResponse_to_merchant_connector_info | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantConnectorListResponse
pub fn to_merchant_connector_info(&self, connector_label: &String) -> MerchantConnectorInfo {
MerchantConnectorInfo {
connector_label: connector_label.to_string(),
merchant_connector_id: self.id.clon... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantConnectorListResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "to_merchant_connector_info",
"num_enums": null,
"num_items": null,
"num_structs": n... |
hyperswitch_method_api_models_MerchantConnectorListResponse_get_connector_name | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantConnectorListResponse
pub fn get_connector_name(&self) -> common_enums::connector_enums::Connector {
self.connector_name
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantConnectorListResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_connector_name",
"num_enums": null,
"num_items": null,
"num_structs": null,
"... |
hyperswitch_method_api_models_MerchantConnectorUpdate_get_frm_config_as_secret | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MerchantConnectorUpdate
pub fn get_frm_config_as_secret(&self) -> Option<Vec<Secret<serde_json::Value>>> {
match self.frm_configs.as_ref() {
Some(frm_value) => {
let configs_for_frm_value: Vec<Secret<serde_json::Value>> = frm... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MerchantConnectorUpdate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_frm_config_as_secret",
"num_enums": null,
"num_items": null,
"num_structs": null,
"... |
hyperswitch_method_api_models_PaymentMethodsEnabled_get_payment_method | clm | method | // hyperswitch/crates/common_types/src/payment_methods.rs
// impl for PaymentMethodsEnabled
pub fn get_payment_method(&self) -> Option<common_enums::PaymentMethod> {
Some(self.payment_method_type)
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "PaymentMethodsEnabled",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_payment_method",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "... |
hyperswitch_method_api_models_PaymentMethodsEnabled_get_payment_method | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for PaymentMethodsEnabled
pub fn get_payment_method(&self) -> Option<common_enums::PaymentMethod> {
Some(self.payment_method)
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "PaymentMethodsEnabled",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_payment_method",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "... |
hyperswitch_method_api_models_PaymentMethodsEnabled_get_payment_method_type | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for PaymentMethodsEnabled
pub fn get_payment_method_type(
&self,
) -> Option<&Vec<payment_methods::RequestPaymentMethodTypes>> {
self.payment_method_types.as_ref()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "PaymentMethodsEnabled",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_payment_method_type",
"num_enums": null,
"num_items": null,
"num_structs": null,
"rep... |
hyperswitch_method_api_models_MaskedHeaders_mask_value | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MaskedHeaders
fn mask_value(value: &str) -> String {
let value_len = value.len();
let masked_value = if value_len <= 4 {
"*".repeat(value_len)
} else {
value
.char_indices()
.map(|... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MaskedHeaders",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "mask_value",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
hyperswitch_method_api_models_MaskedHeaders_from_headers | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for MaskedHeaders
pub fn from_headers(headers: HashMap<String, Secret<String>>) -> Self {
let masked_headers = headers
.into_iter()
.map(|(key, value)| (key, Self::mask_value(value.peek())))
.collect();
Self(mask... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "MaskedHeaders",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "from_headers",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
hyperswitch_method_api_models_BusinessPaymentLinkConfig_validate | clm | method | // hyperswitch/crates/api_models/src/admin.rs
// impl for BusinessPaymentLinkConfig
pub fn validate(&self) -> Result<(), &str> {
let host_domain_valid = self
.domain_name
.clone()
.map(|host_domain| link_utils::validate_strict_domain(&host_domain))
.unwrap_or(tru... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "BusinessPaymentLinkConfig",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "validate",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hypers... |
hyperswitch_method_api_models_ApiError_new | clm | method | // hyperswitch/crates/api_models/src/errors/types.rs
// impl for ApiError
pub fn new(
sub_code: &'static str,
error_identifier: u16,
error_message: impl ToString,
extra: Option<Extra>,
) -> Self {
Self {
sub_code,
error_identifier,
error_m... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ApiError",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line"... |
hyperswitch_method_api_models_ApiErrorResponse_get_internal_error | clm | method | // hyperswitch/crates/api_models/src/errors/types.rs
// impl for ApiErrorResponse
pub(crate) fn get_internal_error(&self) -> &ApiError {
match self {
Self::Unauthorized(i)
| Self::ForbiddenCommonResource(i)
| Self::ForbiddenPrivateResource(i)
| Self::Conflict(i)
... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ApiErrorResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_internal_error",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyper... |
hyperswitch_method_api_models_ApiErrorResponse_get_internal_error_mut | clm | method | // hyperswitch/crates/api_models/src/errors/types.rs
// impl for ApiErrorResponse
pub fn get_internal_error_mut(&mut self) -> &mut ApiError {
match self {
Self::Unauthorized(i)
| Self::ForbiddenCommonResource(i)
| Self::ForbiddenPrivateResource(i)
| Self::Conflic... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ApiErrorResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_internal_error_mut",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "h... |
hyperswitch_method_api_models_ApiErrorResponse_error_type | clm | method | // hyperswitch/crates/api_models/src/errors/types.rs
// impl for ApiErrorResponse
pub(crate) fn error_type(&self) -> &'static str {
match self {
Self::Unauthorized(_)
| Self::ForbiddenCommonResource(_)
| Self::ForbiddenPrivateResource(_)
| Self::Conflict(_)
... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ApiErrorResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "error_type",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",... |
hyperswitch_method_api_models_PaymentIntentMetricsBucketIdentifier_new | clm | method | // hyperswitch/crates/api_models/src/analytics/payment_intents.rs
// impl for PaymentIntentMetricsBucketIdentifier
pub fn new(
status: Option<IntentStatus>,
currency: Option<Currency>,
profile_id: Option<String>,
connector: Option<String>,
auth_type: Option<AuthenticationType>,
... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "PaymentIntentMetricsBucketIdentifier",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "... |
hyperswitch_method_api_models_ApiEventMetricsBucketIdentifier_new | clm | method | // hyperswitch/crates/api_models/src/analytics/api_event.rs
// impl for ApiEventMetricsBucketIdentifier
pub fn new(normalized_time_range: TimeRange) -> Self {
Self {
time_bucket: normalized_time_range,
start_time: normalized_time_range.start_time,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ApiEventMetricsBucketIdentifier",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyper... |
hyperswitch_method_api_models_RefundMetricsBucketIdentifier_new | clm | method | // hyperswitch/crates/api_models/src/analytics/refunds.rs
// impl for RefundMetricsBucketIdentifier
pub fn new(
currency: Option<Currency>,
refund_status: Option<String>,
connector: Option<String>,
refund_type: Option<String>,
profile_id: Option<String>,
refund_reason: O... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RefundMetricsBucketIdentifier",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hypersw... |
hyperswitch_method_api_models_PaymentMetricsBucketIdentifier_new | clm | method | // hyperswitch/crates/api_models/src/analytics/payments.rs
// impl for PaymentMetricsBucketIdentifier
pub fn new(
currency: Option<Currency>,
status: Option<AttemptStatus>,
connector: Option<String>,
auth_type: Option<AuthenticationType>,
payment_method: Option<String>,
... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "PaymentMetricsBucketIdentifier",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hypers... |
hyperswitch_method_api_models_AuthEventMetricsBucketIdentifier_new | clm | method | // hyperswitch/crates/api_models/src/analytics/auth_events.rs
// impl for AuthEventMetricsBucketIdentifier
pub fn new(
authentication_status: Option<AuthenticationStatus>,
trans_status: Option<TransactionStatus>,
authentication_type: Option<DecoupledAuthenticationType>,
error_message: O... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "AuthEventMetricsBucketIdentifier",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hype... |
hyperswitch_method_api_models_DisputeMetricsBucketIdentifier_new | clm | method | // hyperswitch/crates/api_models/src/analytics/disputes.rs
// impl for DisputeMetricsBucketIdentifier
pub fn new(
dispute_stage: Option<DisputeStage>,
connector: Option<String>,
currency: Option<Currency>,
normalized_time_range: TimeRange,
) -> Self {
Self {
disp... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "DisputeMetricsBucketIdentifier",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hypers... |
hyperswitch_method_api_models_FrmMetricsBucketIdentifier_new | clm | method | // hyperswitch/crates/api_models/src/analytics/frm.rs
// impl for FrmMetricsBucketIdentifier
pub fn new(
frm_status: Option<String>,
frm_name: Option<String>,
frm_transaction_type: Option<String>,
normalized_time_range: TimeRange,
) -> Self {
Self {
frm_status,
... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "FrmMetricsBucketIdentifier",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitc... |
hyperswitch_method_api_models_ActivePaymentsMetricsBucketIdentifier_new | clm | method | // hyperswitch/crates/api_models/src/analytics/active_payments.rs
// impl for ActivePaymentsMetricsBucketIdentifier
pub fn new(time_bucket: Option<String>) -> Self {
Self { time_bucket }
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ActivePaymentsMetricsBucketIdentifier",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": ... |
hyperswitch_method_api_models_SearchFilters_is_all_none | clm | method | // hyperswitch/crates/api_models/src/analytics/search.rs
// impl for SearchFilters
pub fn is_all_none(&self) -> bool {
self.payment_method.is_none()
&& self.currency.is_none()
&& self.status.is_none()
&& self.customer_email.is_none()
&& self.search_tags.is_none()... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "SearchFilters",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "is_all_none",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
hyperswitch_method_api_models_SdkEventMetricsBucketIdentifier_new | clm | method | // hyperswitch/crates/api_models/src/analytics/sdk_events.rs
// impl for SdkEventMetricsBucketIdentifier
pub fn new(
payment_method: Option<String>,
platform: Option<String>,
browser_name: Option<String>,
source: Option<String>,
component: Option<String>,
payment_experie... | {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "SdkEventMetricsBucketIdentifier",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyper... |
hyperswitch_method_router_env_Level_into_level | clm | method | // hyperswitch/crates/router_env/src/logger/config.rs
// impl for Level
pub fn into_level(self) -> tracing::Level {
self.0
}
| {
"chunk": null,
"crate": "router_env",
"enum_name": null,
"file_size": null,
"for_type": "Level",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "into_level",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_l... |
hyperswitch_method_router_env_Storage<'a>_new | clm | method | // hyperswitch/crates/router_env/src/logger/storage.rs
// impl for Storage<'a>
pub fn new() -> Self {
Self::default()
}
| {
"chunk": null,
"crate": "router_env",
"enum_name": null,
"file_size": null,
"for_type": "Storage<'a>",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_li... |
hyperswitch_method_router_env_Storage<'a>_record_value | clm | method | // hyperswitch/crates/router_env/src/logger/storage.rs
// impl for Storage<'a>
pub fn record_value(&mut self, key: &'a str, value: serde_json::Value) {
if super::formatter::IMPLICIT_KEYS.contains(key) {
tracing::warn!(value =? value, "{} is a reserved entry. Skipping it.", key);
} else {
... | {
"chunk": null,
"crate": "router_env",
"enum_name": null,
"file_size": null,
"for_type": "Storage<'a>",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "record_value",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
hyperswitch_method_router_env_TraceUrlAssert_compare_url | clm | method | // hyperswitch/crates/router_env/src/logger/setup.rs
// impl for TraceUrlAssert
fn compare_url(&self, url: &str) -> bool {
match self {
Self::Match(value) => url == value,
Self::EndsWith(end) => url.ends_with(end),
}
}
| {
"chunk": null,
"crate": "router_env",
"enum_name": null,
"file_size": null,
"for_type": "TraceUrlAssert",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "compare_url",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
hyperswitch_method_router_env_TraceAssertion_should_trace_url | clm | method | // hyperswitch/crates/router_env/src/logger/setup.rs
// impl for TraceAssertion
fn should_trace_url(&self, url: &str) -> bool {
match &self.clauses {
Some(clauses) => clauses.iter().all(|cur| cur.compare_url(url)),
None => self.default,
}
}
| {
"chunk": null,
"crate": "router_env",
"enum_name": null,
"file_size": null,
"for_type": "TraceAssertion",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "should_trace_url",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswit... |
hyperswitch_method_redis_interface_RedisValue_new | clm | method | // hyperswitch/crates/redis_interface/src/types.rs
// impl for RedisValue
pub fn new(value: FredRedisValue) -> Self {
Self { inner: value }
}
| {
"chunk": null,
"crate": "redis_interface",
"enum_name": null,
"file_size": null,
"for_type": "RedisValue",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"star... |
hyperswitch_method_redis_interface_RedisValue_into_inner | clm | method | // hyperswitch/crates/redis_interface/src/types.rs
// impl for RedisValue
pub fn into_inner(self) -> FredRedisValue {
self.inner
}
| {
"chunk": null,
"crate": "redis_interface",
"enum_name": null,
"file_size": null,
"for_type": "RedisValue",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "into_inner",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
hyperswitch_method_redis_interface_RedisValue_from_bytes | clm | method | // hyperswitch/crates/redis_interface/src/types.rs
// impl for RedisValue
pub fn from_bytes(val: Vec<u8>) -> Self {
Self {
inner: FredRedisValue::Bytes(val.into()),
}
}
| {
"chunk": null,
"crate": "redis_interface",
"enum_name": null,
"file_size": null,
"for_type": "RedisValue",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "from_bytes",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
hyperswitch_method_redis_interface_RedisValue_from_string | clm | method | // hyperswitch/crates/redis_interface/src/types.rs
// impl for RedisValue
pub fn from_string(value: String) -> Self {
Self {
inner: FredRedisValue::String(value.into()),
}
}
| {
"chunk": null,
"crate": "redis_interface",
"enum_name": null,
"file_size": null,
"for_type": "RedisValue",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "from_string",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",... |
hyperswitch_method_redis_interface_RedisSettings_validate | clm | method | // hyperswitch/crates/redis_interface/src/types.rs
// impl for RedisSettings
pub fn validate(&self) -> CustomResult<(), errors::RedisError> {
use common_utils::{ext_traits::ConfigExt, fp_utils::when};
when(self.host.is_default_or_empty(), || {
Err(errors::RedisError::InvalidConfiguration(
... | {
"chunk": null,
"crate": "redis_interface",
"enum_name": null,
"file_size": null,
"for_type": "RedisSettings",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "validate",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",... |
hyperswitch_method_redis_interface_DelReply_is_key_deleted | clm | method | // hyperswitch/crates/redis_interface/src/types.rs
// impl for DelReply
pub fn is_key_deleted(&self) -> bool {
matches!(self, Self::KeyDeleted)
}
| {
"chunk": null,
"crate": "redis_interface",
"enum_name": null,
"file_size": null,
"for_type": "DelReply",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "is_key_deleted",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch"... |
hyperswitch_method_redis_interface_DelReply_is_key_not_deleted | clm | method | // hyperswitch/crates/redis_interface/src/types.rs
// impl for DelReply
pub fn is_key_not_deleted(&self) -> bool {
matches!(self, Self::KeyNotDeleted)
}
| {
"chunk": null,
"crate": "redis_interface",
"enum_name": null,
"file_size": null,
"for_type": "DelReply",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "is_key_not_deleted",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswi... |
hyperswitch_method_redis_interface_SetGetReply<T>_get_value | clm | method | // hyperswitch/crates/redis_interface/src/types.rs
// impl for SetGetReply<T>
pub fn get_value(&self) -> &T {
match self {
Self::ValueSet(value) => value,
Self::ValueExists(value) => value,
}
}
| {
"chunk": null,
"crate": "redis_interface",
"enum_name": null,
"file_size": null,
"for_type": "SetGetReply<T>",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_value",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch... |
hyperswitch_method_redis_interface_RedisKey_tenant_aware_key | clm | method | // hyperswitch/crates/redis_interface/src/types.rs
// impl for RedisKey
pub fn tenant_aware_key(&self, pool: &RedisConnectionPool) -> String {
pool.add_prefix(&self.0)
}
| {
"chunk": null,
"crate": "redis_interface",
"enum_name": null,
"file_size": null,
"for_type": "RedisKey",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "tenant_aware_key",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitc... |
hyperswitch_method_redis_interface_RedisKey_tenant_unaware_key | clm | method | // hyperswitch/crates/redis_interface/src/types.rs
// impl for RedisKey
pub fn tenant_unaware_key(&self, _pool: &RedisConnectionPool) -> String {
self.0.clone()
}
| {
"chunk": null,
"crate": "redis_interface",
"enum_name": null,
"file_size": null,
"for_type": "RedisKey",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "tenant_unaware_key",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswi... |
hyperswitch_method_events_EventBuilder<T, A, E, D>_with | clm | method | // hyperswitch/crates/events/src/lib.rs
// impl for EventBuilder<T, A, E, D>
pub fn with<F: ErasedMaskSerialize, G: EventInfo<Data = F> + 'static>(
mut self,
info: G,
) -> Self {
info.data()
.and_then(|i| {
i.masked_serialize()
.change_context... | {
"chunk": null,
"crate": "events",
"enum_name": null,
"file_size": null,
"for_type": "EventBuilder<T, A, E, D>",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "with",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
hyperswitch_method_events_EventContext<T, A>_emit | clm | method | // hyperswitch/crates/events/src/lib.rs
// impl for EventContext<T, A>
pub fn emit<D, E: Event<EventType = T, Data = D>>(&self, event: E) {
EventBuilder {
message_sink: self.message_sink.clone(),
metadata: self.metadata.clone(),
event,
}
.emit()
}
| {
"chunk": null,
"crate": "events",
"enum_name": null,
"file_size": null,
"for_type": "EventContext<T, A>",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "emit",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"star... |
hyperswitch_method_events_EventContext<T, A>_try_emit | clm | method | // hyperswitch/crates/events/src/lib.rs
// impl for EventContext<T, A>
pub fn try_emit<E: Event<EventType = T>>(&self, event: E) -> Result<(), EventsError> {
EventBuilder {
message_sink: self.message_sink.clone(),
metadata: self.metadata.clone(),
event,
}
.tr... | {
"chunk": null,
"crate": "events",
"enum_name": null,
"file_size": null,
"for_type": "EventContext<T, A>",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "try_emit",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"... |
hyperswitch_method_events_EventContext<T, A>_new | clm | method | // hyperswitch/crates/events/src/lib.rs
// impl for EventContext<T, A>
pub fn new(message_sink: A) -> Self {
Self {
message_sink: Arc::new(message_sink),
metadata: HashMap::new(),
}
}
| {
"chunk": null,
"crate": "events",
"enum_name": null,
"file_size": null,
"for_type": "EventContext<T, A>",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start... |
hyperswitch_method_events_EventContext<T, A>_record_info | clm | method | // hyperswitch/crates/events/src/lib.rs
// impl for EventContext<T, A>
pub fn record_info<G: ErasedMaskSerialize, E: EventInfo<Data = G> + 'static>(
&mut self,
info: E,
) {
match info.data().and_then(|i| {
i.masked_serialize()
.change_context(EventsError::Seriali... | {
"chunk": null,
"crate": "events",
"enum_name": null,
"file_size": null,
"for_type": "EventContext<T, A>",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "record_info",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
hyperswitch_method_events_EventContext<T, A>_event | clm | method | // hyperswitch/crates/events/src/lib.rs
// impl for EventContext<T, A>
pub fn event<D, E: Event<EventType = T, Data = D>>(
&self,
event: E,
) -> EventBuilder<T, A, E, D> {
EventBuilder {
message_sink: self.message_sink.clone(),
metadata: self.metadata.clone(),
... | {
"chunk": null,
"crate": "events",
"enum_name": null,
"file_size": null,
"for_type": "EventContext<T, A>",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "event",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"sta... |
hyperswitch_method_payment_methods_PaymentMethodsState_find_payment_method | clm | method | // hyperswitch/crates/payment_methods/src/state.rs
// impl for PaymentMethodsState
pub async fn find_payment_method(
&self,
key_store: &merchant_key_store::MerchantKeyStore,
merchant_account: &merchant_account::MerchantAccount,
payment_method_id: String,
) -> CustomResult<pm_domain:... | {
"chunk": null,
"crate": "payment_methods",
"enum_name": null,
"file_size": null,
"for_type": "PaymentMethodsState",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "find_payment_method",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo... |
hyperswitch_method_payment_methods_RecordMigrationStatusBuilder_new | clm | method | // hyperswitch/crates/payment_methods/src/core/migration.rs
// impl for RecordMigrationStatusBuilder
pub fn new() -> Self {
Self {
card_migrated: None,
network_token_migrated: None,
connector_mandate_details_migrated: None,
network_transaction_migrated: None,
... | {
"chunk": null,
"crate": "payment_methods",
"enum_name": null,
"file_size": null,
"for_type": "RecordMigrationStatusBuilder",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyp... |
hyperswitch_method_payment_methods_RecordMigrationStatusBuilder_card_migrated | clm | method | // hyperswitch/crates/payment_methods/src/core/migration.rs
// impl for RecordMigrationStatusBuilder
pub fn card_migrated(&mut self, card_migrated: bool) {
self.card_migrated = Some(card_migrated);
}
| {
"chunk": null,
"crate": "payment_methods",
"enum_name": null,
"file_size": null,
"for_type": "RecordMigrationStatusBuilder",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "card_migrated",
"num_enums": null,
"num_items": null,
"num_structs": null,
"r... |
hyperswitch_method_payment_methods_RecordMigrationStatusBuilder_network_token_migrated | clm | method | // hyperswitch/crates/payment_methods/src/core/migration.rs
// impl for RecordMigrationStatusBuilder
pub fn network_token_migrated(&mut self, network_token_migrated: Option<bool>) {
self.network_token_migrated = network_token_migrated;
}
| {
"chunk": null,
"crate": "payment_methods",
"enum_name": null,
"file_size": null,
"for_type": "RecordMigrationStatusBuilder",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "network_token_migrated",
"num_enums": null,
"num_items": null,
"num_structs": n... |
hyperswitch_method_payment_methods_RecordMigrationStatusBuilder_connector_mandate_details_migrated | clm | method | // hyperswitch/crates/payment_methods/src/core/migration.rs
// impl for RecordMigrationStatusBuilder
pub fn connector_mandate_details_migrated(
&mut self,
connector_mandate_details_migrated: Option<bool>,
) {
self.connector_mandate_details_migrated = connector_mandate_details_migrated;
... | {
"chunk": null,
"crate": "payment_methods",
"enum_name": null,
"file_size": null,
"for_type": "RecordMigrationStatusBuilder",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "connector_mandate_details_migrated",
"num_enums": null,
"num_items": null,
"num... |
hyperswitch_method_payment_methods_RecordMigrationStatusBuilder_network_transaction_id_migrated | clm | method | // hyperswitch/crates/payment_methods/src/core/migration.rs
// impl for RecordMigrationStatusBuilder
pub fn network_transaction_id_migrated(&mut self, network_transaction_migrated: Option<bool>) {
self.network_transaction_migrated = network_transaction_migrated;
}
| {
"chunk": null,
"crate": "payment_methods",
"enum_name": null,
"file_size": null,
"for_type": "RecordMigrationStatusBuilder",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "network_transaction_id_migrated",
"num_enums": null,
"num_items": null,
"num_st... |
hyperswitch_method_payment_methods_RecordMigrationStatusBuilder_build | clm | method | // hyperswitch/crates/payment_methods/src/core/migration.rs
// impl for RecordMigrationStatusBuilder
pub fn build(self) -> RecordMigrationStatus {
RecordMigrationStatus {
card_migrated: self.card_migrated,
network_token_migrated: self.network_token_migrated,
connector_mandat... | {
"chunk": null,
"crate": "payment_methods",
"enum_name": null,
"file_size": null,
"for_type": "RecordMigrationStatusBuilder",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "build",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "h... |
hyperswitch_method_payment_methods_RequiredField_to_tuple | clm | method | // hyperswitch/crates/payment_methods/src/configs/payment_connector_required_fields.rs
// impl for RequiredField
fn to_tuple(&self) -> (String, RequiredFieldInfo) {
match self {
Self::CardNumber => (
"payment_method_data.card.card_number".to_string(),
RequiredFieldIn... | {
"chunk": null,
"crate": "payment_methods",
"enum_name": null,
"file_size": null,
"for_type": "RequiredField",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "to_tuple",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",... |
hyperswitch_method_payment_methods_RequiredFields_new | clm | method | // hyperswitch/crates/payment_methods/src/configs/payment_connector_required_fields.rs
// impl for RequiredFields
pub fn new(bank_config: &BankRedirectConfig) -> Self {
let cards_required_fields = get_cards_required_fields();
let mut debit_required_fields = cards_required_fields.clone();
debit_... | {
"chunk": null,
"crate": "payment_methods",
"enum_name": null,
"file_size": null,
"for_type": "RequiredFields",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"... |
hyperswitch_method_pm_auth_ErrorResponse_get_not_implemented | clm | method | // hyperswitch/crates/hyperswitch_domain_models/src/router_data.rs
// impl for 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,
... | {
"chunk": null,
"crate": "pm_auth",
"enum_name": null,
"file_size": null,
"for_type": "ErrorResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_not_implemented",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitc... |
hyperswitch_method_pm_auth_ErrorResponse_get_not_implemented | clm | method | // hyperswitch/crates/pm_auth/src/types.rs
// impl for ErrorResponse
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::Statu... | {
"chunk": null,
"crate": "pm_auth",
"enum_name": null,
"file_size": null,
"for_type": "ErrorResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_not_implemented",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitc... |
hyperswitch_method_external_services_CrmManagerConfig_validate | clm | method | // hyperswitch/crates/external_services/src/crm.rs
// impl for CrmManagerConfig
pub fn validate(&self) -> Result<(), InvalidCrmConfig> {
match self {
Self::HubspotProxy { hubspot_proxy } => hubspot_proxy.validate(),
Self::NoCrm => Ok(()),
}
}
| {
"chunk": null,
"crate": "external_services",
"enum_name": null,
"file_size": null,
"for_type": "CrmManagerConfig",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "validate",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswi... |
hyperswitch_method_external_services_CrmManagerConfig_get_crm_client | clm | method | // hyperswitch/crates/external_services/src/crm.rs
// impl for CrmManagerConfig
pub async fn get_crm_client(&self) -> Arc<dyn CrmInterface> {
match self {
Self::HubspotProxy { hubspot_proxy } => Arc::new(hubspot_proxy.clone()),
Self::NoCrm => Arc::new(NoCrm),
}
}
| {
"chunk": null,
"crate": "external_services",
"enum_name": null,
"file_size": null,
"for_type": "CrmManagerConfig",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_crm_client",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hy... |
hyperswitch_method_external_services_GrpcClientSettings_get_grpc_client_interface | clm | method | // hyperswitch/crates/external_services/src/grpc_client.rs
// impl for GrpcClientSettings
pub async fn get_grpc_client_interface(&self) -> Arc<GrpcClients> {
#[cfg(any(feature = "dynamic_routing", feature = "revenue_recovery"))]
let client =
hyper_util::client::legacy::Client::builder(hyper... | {
"chunk": null,
"crate": "external_services",
"enum_name": null,
"file_size": null,
"for_type": "GrpcClientSettings",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_grpc_client_interface",
"num_enums": null,
"num_items": null,
"num_structs": null,
... |
hyperswitch_method_external_services_IntermediateString_new | clm | method | // hyperswitch/crates/external_services/src/email.rs
// impl for IntermediateString
pub fn new(inner: String) -> Self {
Self(inner)
}
| {
"chunk": null,
"crate": "external_services",
"enum_name": null,
"file_size": null,
"for_type": "IntermediateString",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch... |
hyperswitch_method_external_services_IntermediateString_into_inner | clm | method | // hyperswitch/crates/external_services/src/email.rs
// impl for IntermediateString
pub fn into_inner(self) -> String {
self.0
}
| {
"chunk": null,
"crate": "external_services",
"enum_name": null,
"file_size": null,
"for_type": "IntermediateString",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "into_inner",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hype... |
hyperswitch_method_external_services_FileStorageConfig_validate | clm | method | // hyperswitch/crates/external_services/src/file_storage.rs
// impl for FileStorageConfig
pub fn validate(&self) -> Result<(), InvalidFileStorageConfig> {
match self {
#[cfg(feature = "aws_s3")]
Self::AwsS3 { aws_s3 } => aws_s3.validate(),
Self::FileSystem => Ok(()),
... | {
"chunk": null,
"crate": "external_services",
"enum_name": null,
"file_size": null,
"for_type": "FileStorageConfig",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "validate",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hypersw... |
hyperswitch_method_external_services_FileStorageConfig_get_file_storage_client | clm | method | // hyperswitch/crates/external_services/src/file_storage.rs
// impl for FileStorageConfig
pub async fn get_file_storage_client(&self) -> Arc<dyn FileStorageInterface> {
match self {
#[cfg(feature = "aws_s3")]
Self::AwsS3 { aws_s3 } => Arc::new(aws_s3::AwsFileStorageClient::new(aws_s3).a... | {
"chunk": null,
"crate": "external_services",
"enum_name": null,
"file_size": null,
"for_type": "FileStorageConfig",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_file_storage_client",
"num_enums": null,
"num_items": null,
"num_structs": null,
"... |
hyperswitch_method_external_services_HubspotRequest_new | clm | method | // hyperswitch/crates/external_services/src/hubspot_proxy.rs
// impl for HubspotRequest
pub fn new(
country: String,
hubspot_form_id: String,
firstname: Secret<String>,
email: Secret<String>,
company_name: String,
website: String,
) -> Self {
Self {
... | {
"chunk": null,
"crate": "external_services",
"enum_name": null,
"file_size": null,
"for_type": "HubspotRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
hyperswitch_method_external_services_HashiCorpVaultConfig_validate | clm | method | // hyperswitch/crates/external_services/src/hashicorp_vault/core.rs
// impl for HashiCorpVaultConfig
pub fn validate(&self) -> Result<(), &'static str> {
when(self.url.is_default_or_empty(), || {
Err("HashiCorp vault url must not be empty")
})?;
when(self.token.is_default_or_empty(... | {
"chunk": null,
"crate": "external_services",
"enum_name": null,
"file_size": null,
"for_type": "HashiCorpVaultConfig",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "validate",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hype... |
hyperswitch_method_external_services_HashiCorpVault_new | clm | method | // hyperswitch/crates/external_services/src/hashicorp_vault/core.rs
// impl for HashiCorpVault
pub fn new(config: &HashiCorpVaultConfig) -> error_stack::Result<Self, HashiCorpError> {
VaultClient::new(
VaultClientSettingsBuilder::default()
.address(&config.url)
.toke... | {
"chunk": null,
"crate": "external_services",
"enum_name": null,
"file_size": null,
"for_type": "HashiCorpVault",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.