mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
refactor(core): Adapt the usage of routing_algorithm_id in routing and payments core for v2 (#5533)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -3,7 +3,8 @@ use common_utils::events::{ApiEventMetric, ApiEventsType};
|
||||
use crate::routing::{
|
||||
LinkedRoutingConfigRetrieveResponse, MerchantRoutingAlgorithm, ProfileDefaultRoutingConfig,
|
||||
RoutingAlgorithmId, RoutingConfigRequest, RoutingDictionaryRecord, RoutingKind,
|
||||
RoutingLinkWrapper, RoutingPayloadWrapper, RoutingRetrieveLinkQuery, RoutingRetrieveQuery,
|
||||
RoutingLinkWrapper, RoutingPayloadWrapper, RoutingRetrieveLinkQuery,
|
||||
RoutingRetrieveLinkQueryWrapper, RoutingRetrieveQuery,
|
||||
};
|
||||
|
||||
impl ApiEventMetric for RoutingKind {
|
||||
@ -70,3 +71,8 @@ impl ApiEventMetric for RoutingLinkWrapper {
|
||||
Some(ApiEventsType::Routing)
|
||||
}
|
||||
}
|
||||
impl ApiEventMetric for RoutingRetrieveLinkQueryWrapper {
|
||||
fn get_api_event_type(&self) -> Option<ApiEventsType> {
|
||||
Some(ApiEventsType::Routing)
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,8 +58,6 @@ pub struct ProfileDefaultRoutingConfig {
|
||||
pub struct RoutingRetrieveQuery {
|
||||
pub limit: Option<u16>,
|
||||
pub offset: Option<u8>,
|
||||
|
||||
pub profile_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize)]
|
||||
@ -67,6 +65,11 @@ pub struct RoutingRetrieveLinkQuery {
|
||||
pub profile_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize)]
|
||||
pub struct RoutingRetrieveLinkQueryWrapper {
|
||||
pub routing_query: RoutingRetrieveQuery,
|
||||
pub profile_id: String,
|
||||
}
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
/// Response of the retrieved routing configs for a merchant account
|
||||
pub struct RoutingRetrieveResponse {
|
||||
|
||||
Reference in New Issue
Block a user