mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat(dynamic_routing): add get api for dynamic routing volume split (#8114)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -7,8 +7,9 @@ use crate::routing::{
|
||||
RoutingAlgorithmId, RoutingConfigRequest, RoutingDictionaryRecord, RoutingKind,
|
||||
RoutingLinkWrapper, RoutingPayloadWrapper, RoutingRetrieveLinkQuery,
|
||||
RoutingRetrieveLinkQueryWrapper, RoutingRetrieveQuery, RoutingVolumeSplit,
|
||||
RoutingVolumeSplitWrapper, SuccessBasedRoutingConfig, SuccessBasedRoutingPayloadWrapper,
|
||||
ToggleDynamicRoutingQuery, ToggleDynamicRoutingWrapper,
|
||||
RoutingVolumeSplitResponse, RoutingVolumeSplitWrapper, SuccessBasedRoutingConfig,
|
||||
SuccessBasedRoutingPayloadWrapper, ToggleDynamicRoutingPath, ToggleDynamicRoutingQuery,
|
||||
ToggleDynamicRoutingWrapper,
|
||||
};
|
||||
|
||||
impl ApiEventMetric for RoutingKind {
|
||||
@ -135,6 +136,18 @@ impl ApiEventMetric for RoutingVolumeSplitWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
impl ApiEventMetric for ToggleDynamicRoutingPath {
|
||||
fn get_api_event_type(&self) -> Option<ApiEventsType> {
|
||||
Some(ApiEventsType::Routing)
|
||||
}
|
||||
}
|
||||
|
||||
impl ApiEventMetric for RoutingVolumeSplitResponse {
|
||||
fn get_api_event_type(&self) -> Option<ApiEventsType> {
|
||||
Some(ApiEventsType::Routing)
|
||||
}
|
||||
}
|
||||
|
||||
impl ApiEventMetric for RoutingVolumeSplit {
|
||||
fn get_api_event_type(&self) -> Option<ApiEventsType> {
|
||||
Some(ApiEventsType::Routing)
|
||||
|
||||
@ -857,6 +857,11 @@ pub struct ToggleDynamicRoutingPath {
|
||||
pub profile_id: common_utils::id_type::ProfileId,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
pub struct RoutingVolumeSplitResponse {
|
||||
pub split: u8,
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, ToSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct EliminationRoutingConfig {
|
||||
|
||||
Reference in New Issue
Block a user