mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	feat(routing): Contract based routing integration (#6761)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -1,12 +1,13 @@ | ||||
| use common_utils::events::{ApiEventMetric, ApiEventsType}; | ||||
|  | ||||
| use crate::routing::{ | ||||
|     LinkedRoutingConfigRetrieveResponse, MerchantRoutingAlgorithm, ProfileDefaultRoutingConfig, | ||||
|     RoutingAlgorithmId, RoutingConfigRequest, RoutingDictionaryRecord, RoutingKind, | ||||
|     RoutingLinkWrapper, RoutingPayloadWrapper, RoutingRetrieveLinkQuery, | ||||
|     ContractBasedRoutingPayloadWrapper, ContractBasedRoutingSetupPayloadWrapper, | ||||
|     DynamicRoutingUpdateConfigQuery, LinkedRoutingConfigRetrieveResponse, MerchantRoutingAlgorithm, | ||||
|     ProfileDefaultRoutingConfig, RoutingAlgorithmId, RoutingConfigRequest, RoutingDictionaryRecord, | ||||
|     RoutingKind, RoutingLinkWrapper, RoutingPayloadWrapper, RoutingRetrieveLinkQuery, | ||||
|     RoutingRetrieveLinkQueryWrapper, RoutingRetrieveQuery, RoutingVolumeSplitWrapper, | ||||
|     SuccessBasedRoutingConfig, SuccessBasedRoutingPayloadWrapper, | ||||
|     SuccessBasedRoutingUpdateConfigQuery, ToggleDynamicRoutingQuery, ToggleDynamicRoutingWrapper, | ||||
|     SuccessBasedRoutingConfig, SuccessBasedRoutingPayloadWrapper, ToggleDynamicRoutingQuery, | ||||
|     ToggleDynamicRoutingWrapper, | ||||
| }; | ||||
|  | ||||
| impl ApiEventMetric for RoutingKind { | ||||
| @ -97,13 +98,25 @@ impl ApiEventMetric for SuccessBasedRoutingPayloadWrapper { | ||||
|     } | ||||
| } | ||||
|  | ||||
| impl ApiEventMetric for ContractBasedRoutingPayloadWrapper { | ||||
|     fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||||
|         Some(ApiEventsType::Routing) | ||||
|     } | ||||
| } | ||||
|  | ||||
| impl ApiEventMetric for ContractBasedRoutingSetupPayloadWrapper { | ||||
|     fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||||
|         Some(ApiEventsType::Routing) | ||||
|     } | ||||
| } | ||||
|  | ||||
| impl ApiEventMetric for ToggleDynamicRoutingWrapper { | ||||
|     fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||||
|         Some(ApiEventsType::Routing) | ||||
|     } | ||||
| } | ||||
|  | ||||
| impl ApiEventMetric for SuccessBasedRoutingUpdateConfigQuery { | ||||
| impl ApiEventMetric for DynamicRoutingUpdateConfigQuery { | ||||
|     fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||||
|         Some(ApiEventsType::Routing) | ||||
|     } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Sarthak Soni
					Sarthak Soni