text stringlengths 70 351k | source stringclasses 4
values |
|---|---|
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::routing::DynamicRoutingAlgoAccessor;
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use common_utils::ext_traits::AsyncExt;
use diesel_models::routing_al... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
let record = db
.insert_routing_algorithm(algo)
.await
.to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?;
let new_record = record.foreign_into();
metrics::ROUTING_CREATE_SUCCES... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use common_utils::ext_traits::AsyncExt;
use diesel_models::routing_algorithm::RoutingAlgorithm;
use super::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use common_utils::ext_traits::AsyncExt;
use diesel_models::routing_algorithm::RoutingAlgorithm;
use super::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
pub trait GetRoutableConnectorsForChoice {
async fn get_routable_connectors(
&self,
db: &dyn StorageInterface,
business_profile: &domain::Profile,
) -> RouterResult<RoutableConnectors>;
}
pub struct St... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
.await
.change_context(errors::ApiErrorResponse::GenericNotFoundError {
message: "Failed to invalidate the routing keys".to_string(),
})
})
.await
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use std::collections::HashSet;
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use super::{
errors::RouterResult,
payments::{
routing::{sel... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use super::{
errors::RouterResult,
payments::{
routing::{self as payments_routing},
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use common_utils::ext_traits::AsyncExt;
use crate::{
core::{
errors::{self, CustomResult, Route... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use common_utils::ext_traits::AsyncExt;
use crate::{core::admin, utils::ValueExt};
use crate::{
core::{... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use common_utils::ext_traits::AsyncExt;
use super::{
errors::RouterResult,
payments::{
routing::{self as payments_routing},
OperationSessionGetters,
},
};
use crate::{
core::{
errors::{self, Cus... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use common_utils::ext_traits::AsyncExt;
use diesel_models::routing_algorithm::RoutingAlgorithm;
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use hyperswitch_domain_models::{mandates, payment_address};
use crate::{
core::{
errors::{self,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::routing::DynamicRoutingAlgoAccessor;
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use common_utils::ext_traits::AsyncExt;
use diesel_mod... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::routing::DynamicRoutingAlgoAccessor;
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use common_utils::ext_traits::AsyncExt;
use diesel_mod... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use common_utils::ext_traits::AsyncExt;
use rustc_hash::FxHashSet;
use super::{
errors::RouterResult,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::routing::DynamicRoutingAlgoAccessor;
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use common_utils::ext_traits::AsyncExt;
use diesel_mod... | ast_fragments |
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use common_utils::ext_traits::AsyncExt;
use diesel_models::routing_algorithm::RoutingAlgorithm;
use super::{
errors::R... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
use api_models::routing::DynamicRoutingAlgoAccessor;
use api_models::{
enums, mandates as mandates_api, routing,
routing::{self as routing_types, RoutingRetrieveQuery},
};
use common_utils::ext_traits::AsyncExt;
use diesel_mod... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/routing.rs | crate: router
algorithm_id,
transaction_type,
)
.await?;
metrics::ROUTING_LINK_CONFIG_SUCCESS_RESPONSE.add(1, &[]);
Ok(service_api::ApplicationResponse::Json(
routing_algorithm.0.foreign_into... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/health_check.rs | crate: router
use analytics::health_check::HealthCheck;
use api_models::health_check::HealthState;
use crate::{
consts,
core::errors::{self, CustomResult},
routes::app,
services::api as services,
};
async fn health_check_analyt... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/health_check.rs | crate: router
use api_models::health_check::HealthState;
use router_env::logger;
use crate::{
consts,
core::errors::{self, CustomResult},
routes::app,
services::api as services,
};
async fn health_check_redis(&self) -> CustomRe... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/health_check.rs | crate: router
use analytics::health_check::HealthCheck;
use api_models::health_check::HealthState;
use crate::{
consts,
core::errors::{self, CustomResult},
routes::app,
services::api as services,
};
async fn health_check_analyt... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/health_check.rs | crate: router
use api_models::health_check::HealthCheckMap;
use router_env::logger;
use crate::{
consts,
core::errors::{self, CustomResult},
routes::app,
services::api as services,
};
async fn health_check_grpc(
&self,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/health_check.rs | crate: router
use api_models::health_check::HealthState;
use router_env::logger;
use crate::{
consts,
core::errors::{self, CustomResult},
routes::app,
services::api as services,
};
async fn health_check_outgoing(
&self,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/health_check.rs | crate: router
use api_models::health_check::HealthState;
use crate::{
consts,
core::errors::{self, CustomResult},
routes::app,
services::api as services,
};
async fn health_check_opensearch(
&self,
) -> CustomResult... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/health_check.rs | crate: router
use api_models::health_check::HealthState;
use error_stack::ResultExt;
use crate::{
consts,
core::errors::{self, CustomResult},
routes::app,
services::api as services,
};
async fn health_check_locker(
&sel... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/health_check.rs | crate: router
use api_models::health_check::HealthState;
use crate::{
consts,
core::errors::{self, CustomResult},
routes::app,
services::api as services,
};
async fn health_check_db(&self) -> CustomResult<HealthState, errors::H... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/apple_pay_certificates_migration.rs | crate: router
use api_models::apple_pay_certificates_migration;
use common_utils::{errors::CustomResult, type_name, types::keymanager::Identifier};
use masking::{PeekInterface, Secret};
use super::{
errors::{self, Stora... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/apple_pay_certificates_migration.rs | crate: router
use api_models::apple_pay_certificates_migration;
use common_utils::{errors::CustomResult, type_name, types::keymanager::Identifier};
use masking::{PeekInterface, Secret};
use super::{
errors::{self, Stora... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/relay.rs | crate: router
use api_models::relay as relay_api_models;
use hyperswitch_domain_models::relay;
use super::errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt};
use crate::{
core::payments,
routes::SessionState,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/relay.rs | crate: router
use api_models::relay as relay_api_models;
use common_utils::{
self, fp_utils,
id_type::{self, GenerateId},
};
use hyperswitch_domain_models::relay;
use super::errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, Stor... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/relay.rs | crate: router
use api_models::relay as relay_api_models;
use hyperswitch_domain_models::relay;
use super::errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt};
fn generate_response(value: relay::Relay) -> RouterResult<api_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/relay.rs | crate: router
use api_models::relay as relay_api_models;
use hyperswitch_domain_models::relay;
use super::errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt};
use crate::{
core::payments,
routes::SessionState,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/relay.rs | crate: router
use api_models::relay as relay_api_models;
use common_enums::RelayStatus;
use common_utils::{
self, fp_utils,
id_type::{self, GenerateId},
};
use hyperswitch_domain_models::relay;
use super::errors::{self, ConnectorErrorExt, Rou... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/relay.rs | crate: router
use std::marker::PhantomData;
use api_models::relay as relay_api_models;
use hyperswitch_domain_models::relay;
use super::errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt};
pub fn from_relay_request(relay_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/relay.rs | crate: router
use api_models::relay as relay_api_models;
use common_enums::RelayStatus;
use hyperswitch_domain_models::relay;
fn should_call_connector_for_relay_refund_status(relay: &relay::Relay, force_sync: bool) -> bool {
<|fim_suffix|>
<|fim_midd... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/relay.rs | crate: router
use api_models::relay as relay_api_models;
use common_enums::RelayStatus;
use common_utils::{
self, fp_utils,
id_type::{self, GenerateId},
};
use hyperswitch_domain_models::relay;
use super::errors::{self, ConnectorErrorExt, Rou... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/relay.rs | crate: router
use api_models::relay as relay_api_models;
use common_enums::RelayStatus;
use common_utils::{
self, fp_utils,
id_type::{self, GenerateId},
};
use hyperswitch_domain_models::relay;
fn get_domain_models(
relay_request: Rel... | ast_fragments |
// file: hyperswitch/crates/router/src/core/relay.rs | crate: router
use std::marker::PhantomData;
use api_models::relay as relay_api_models;
use hyperswitch_domain_models::relay;
use super::errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt};
pub fn from_relay_request(relay_request: relay_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/relay.rs | crate: router
use api_models::relay as relay_api_models;
use hyperswitch_domain_models::relay;
use super::errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt};
fn validate_relay_request(req: &Self::Request) -> RouterResult... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/relay.rs | crate: router
use api_models::relay as relay_api_models;
use common_enums::RelayStatus;
use common_utils::{
self, fp_utils,
id_type::{self, GenerateId},
};
use hyperswitch_domain_models::relay;
use super::errors::{self, ConnectorErrorExt, Rou... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/mandate.rs | crate: router
use common_utils::{ext_traits::Encode, id_type};
use error_stack::{report, ResultExt};
use crate::{
core::{
errors::{self, RouterResponse, StorageErrorExt},
payments::CallConnectorAction,
},
db::StorageInte... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/mandate.rs | crate: router
use common_utils::{ext_traits::Encode, id_type};
use crate::{
core::{
errors::{self, RouterResponse, StorageErrorExt},
payments::CallConnectorAction,
},
db::StorageInterface,
routes::{metrics, SessionSt... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/mandate.rs | crate: router
use crate::{
core::{
errors::{self, RouterResponse, StorageErrorExt},
payments::CallConnectorAction,
},
db::StorageInterface,
routes::{metrics, SessionState},
services,
types::{
self,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/mandate.rs | crate: router
fn get_insensitive_payment_method_data_if_exists<F, FData>(
router_data: &types::RouterData<F, FData, types::PaymentsResponseData>,
) -> Option<domain::PaymentMethodData>
where
FData: MandateBehaviour,
{
match &router_data... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/mandate.rs | crate: router
use crate::{
core::{
errors::{self, RouterResponse, StorageErrorExt},
payments::CallConnectorAction,
},
db::StorageInterface,
routes::{metrics, SessionState},
services,
types::{
self,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/mandate.rs | crate: router
use api_models::payments;
use futures::future;
use crate::{
core::{
errors::{self, RouterResponse, StorageErrorExt},
payments::CallConnectorAction,
},
db::StorageInterface,
routes::{metrics, SessionStat... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/mandate.rs | crate: router
use crate::{
core::{
errors::{self, RouterResponse, StorageErrorExt},
payments::CallConnectorAction,
},
db::StorageInterface,
routes::{metrics, SessionState},
services,
types::{
self,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/mandate.rs | crate: router
use common_utils::{ext_traits::Encode, id_type};
use diesel_models::enums as storage_enums;
use router_env::{instrument, logger, tracing};
use super::payments::helpers as payment_helper;
use crate::{
core::{
errors::{self,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/mandate.rs | crate: router
use diesel_models::enums as storage_enums;
use super::payments::helpers as payment_helper;
use crate::{
core::{
errors::{self, RouterResponse, StorageErrorExt},
payments::CallConnectorAction,
},
db::Storage... | ast_fragments |
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransact... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use api_models::enums::{DisputeStage, DisputeStatus};
use api_models::payouts::PayoutVendorAccountDetails;
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use api_models::enums::{DisputeStage, DisputeStatus};
use api_models::payouts::PayoutVendorAccountDetails;
use super::payouts::{helpers as payout_helpers, PayoutData};
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use super::payouts::{helpe... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, Co... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
message: "Couldn't find profile_id in record for authentication".to_string(),
}
.into(),
)
.attach_printable(format!("Couldn't find profile_id in entity {:?}", object)),
(N... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
{
Some(item)
} else {
None
}
})
.collect()
} else {
object_list
}
}
pub(crate) fn validate_profile_id_from_... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use crate::{
configs::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use error_stack::{report, ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use api_models::enums::{DisputeStage, DisputeStatus};
use api_models::payouts::PayoutVendorAccountDetails;
use common_enums::{IntentStatus, RequestIncrementalAuthorizat... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use crate::{
configs::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use common_enums::{IntentStatus, RequestIncrementalAuthorization};
pub fn get_incremental_authorization_allowed_value(
incremental_authorization_allowed: Option<bool>,
request_incremental_authorization: Option<RequestIncremental... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use common_enums::{IntentStatus, RequestIncrementalAuthorization};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use crate::{... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
pub fn get_external_authen... | ast_fragments |
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
pub fn get_poll_id(merchant_id: &common_u... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use api_models::enums::{DisputeStage, DisputeStatus};
use api_models::payouts::PayoutVendorAccountDetails;
use crate::{
configs::Settings,
consts,
core::{
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use hyperswitch_domain_mod... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use crate::{
configs::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use api_models::enums::{DisputeStage, DisputeStatus};
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransac... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use api_models::enums::{DisputeStage, DisputeStatus};
pub fn validate_dispute_status(
prev_dispute_status: DisputeStatus,
dispute_status: DisputeStatus,
) -> bool {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use api_models::enums::{DisputeStage, DisputeStatus};
pub fn validate_dispute_stage(
prev_dispute_stage: DisputeStage,
dispute_stage: DisputeStage,
) -> bool {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, Co... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, Co... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use crate::{
configs::Settings,
consts,
core::{
errors::{self, RouterResult, StorageErrorExt},
payments::PaymentData,
},
db::StorageInterface,
routes::SessionState,
types::{
self, api,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
fn validate_id_proper_response() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
fn validate_id_length_constraint() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use uuid::U... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use api_models::enums::{DisputeStage, DisputeStatus};
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, C... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use hyperswitch_domain_models::{
merchant_connector_account::MerchantConnec... | ast_fragments |
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use api_models::enums::{DisputeStage, DisputeStatus};
use api_models::payouts::PayoutVendorAccountDetails;
use common_utils::{crypto::Encryptable, pii::Email};
use common_utils::{
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use api_models::payouts::PayoutVendorAccountDetails;
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, Co... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use api_models::enums::{DisputeStage, DisputeStatus};
use api_models::payouts::PayoutVendorAccountDetails;
use common_utils::{
errors::CustomResult,
ext_traits:... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use api_models::payouts::PayoutVendorAccountDetails;
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, Co... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use api_models::payouts::PayoutVendorAccountDetails;
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, Co... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use api_models::payouts::PayoutVendorAccountDetails;
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, Co... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use common_utils::{
errors::CustomResult,
ext_traits::AsyncExt,
types::{keymanager::KeyManagerState, ConnectorTransactionIdTrait, MinorUnit},
};
use hyperswitch_domain_models::{
merchant_connector_account::MerchantConnec... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use api_models::enums::{DisputeStage, DisputeStatus};
use api_models::payouts::PayoutVendorAccountDetails;
use common_utils::{crypto::Encryptable, pii::Email};
use comm... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/utils.rs | crate: router
use std::{collections::HashSet, marker::PhantomData, str::FromStr};
use api_models::enums::{DisputeStage, DisputeStatus};
use api_models::payouts::PayoutVendorAccountDetails;
use common_utils::{
errors::CustomResult,
ext_traits:... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/admin.rs | crate: router
use common_utils::{
date_time,
ext_traits::{AsyncExt, Encode, OptionExt, ValueExt},
fp_utils, id_type, pii, type_name,
types::keymanager::{self as km_types, KeyManagerState, ToEncryptable},
};
use crate::{
consts,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/admin.rs | crate: router
code: err.code,
message: err.message,
connector: connector.connector_name.to_string(),
status_code: err.status_code,
reason: err.reason,
})?;
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/admin.rs | crate: router
use common_utils::{
date_time,
ext_traits::{AsyncExt, Encode, OptionExt, ValueExt},
fp_utils, id_type, pii, type_name,
types::keymanager::{self as km_types, KeyManagerState, ToEncryptable},
};
use pm_auth::{connector::pl... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/admin.rs | crate: router
business_profile,
profile_update,
)
.await
.to_not_found_response(errors::ApiErrorResponse::ProfileNotFound {
id: profile_id.get_string_repr().to_owned(),
})?;
}
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/admin.rs | crate: router
key_manager_state,
merchant_key_store,
self.profile,
profile_update,
)
.await
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printab... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/admin.rs | crate: router
pub fn get_default_routing_configs_from_profile(
&self,
) -> RouterResult<routing_types::ProfileDefaultRoutingConfig> {
let profile_id = self.profile.get_id().to_owned();
let connectors = self.get_default... | ast_fragments |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.