mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
feat(euclid): add dynamic routing in core flows (#6333)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -160,7 +160,6 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
routes::routing::routing_retrieve_default_config_for_profiles,
|
||||
routes::routing::routing_update_default_config_for_profile,
|
||||
routes::routing::toggle_success_based_routing,
|
||||
routes::routing::success_based_routing_update_configs,
|
||||
|
||||
// Routes for blocklist
|
||||
routes::blocklist::remove_entry_from_blocklist,
|
||||
@ -566,6 +565,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
api_models::routing::RoutingDictionaryRecord,
|
||||
api_models::routing::RoutingKind,
|
||||
api_models::routing::RoutableConnectorChoice,
|
||||
api_models::routing::SuccessBasedRoutingFeatures,
|
||||
api_models::routing::LinkedRoutingConfigRetrieveResponse,
|
||||
api_models::routing::RoutingRetrieveResponse,
|
||||
api_models::routing::ProfileDefaultRoutingConfig,
|
||||
@ -577,11 +577,6 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
api_models::routing::ConnectorVolumeSplit,
|
||||
api_models::routing::ConnectorSelection,
|
||||
api_models::routing::ToggleSuccessBasedRoutingQuery,
|
||||
api_models::routing::SuccessBasedRoutingConfig,
|
||||
api_models::routing::SuccessBasedRoutingConfigParams,
|
||||
api_models::routing::SuccessBasedRoutingConfigBody,
|
||||
api_models::routing::CurrentBlockThreshold,
|
||||
api_models::routing::SuccessBasedRoutingUpdateConfigQuery,
|
||||
api_models::routing::ToggleSuccessBasedRoutingPath,
|
||||
api_models::routing::ast::RoutableChoiceKind,
|
||||
api_models::enums::RoutableConnectors,
|
||||
|
||||
@ -266,7 +266,7 @@ pub async fn routing_update_default_config_for_profile() {}
|
||||
params(
|
||||
("account_id" = String, Path, description = "Merchant id"),
|
||||
("profile_id" = String, Path, description = "Profile id under which Dynamic routing needs to be toggled"),
|
||||
("status" = bool, Query, description = "Boolean value for mentioning the expected state of dynamic routing"),
|
||||
("enable" = SuccessBasedRoutingFeatures, Query, description = "Feature to enable for success based routing"),
|
||||
),
|
||||
responses(
|
||||
(status = 200, description = "Routing Algorithm created", body = RoutingDictionaryRecord),
|
||||
@ -281,30 +281,3 @@ pub async fn routing_update_default_config_for_profile() {}
|
||||
security(("api_key" = []), ("jwt_key" = []))
|
||||
)]
|
||||
pub async fn toggle_success_based_routing() {}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
/// Routing - Update config for success based dynamic routing
|
||||
///
|
||||
/// Update config for success based dynamic routing
|
||||
#[utoipa::path(
|
||||
patch,
|
||||
path = "/account/:account_id/business_profile/:profile_id/dynamic_routing/success_based/config/:algorithm_id",
|
||||
request_body = SuccessBasedRoutingConfig,
|
||||
params(
|
||||
("account_id" = String, Path, description = "Merchant id"),
|
||||
("profile_id" = String, Path, description = "The unique identifier for a profile"),
|
||||
("algorithm_id" = String, Path, description = "The unique identifier for routing algorithm"),
|
||||
),
|
||||
responses(
|
||||
(status = 200, description = "Routing Algorithm updated", body = RoutingDictionaryRecord),
|
||||
(status = 400, description = "Request body is malformed"),
|
||||
(status = 500, description = "Internal server error"),
|
||||
(status = 404, description = "Resource missing"),
|
||||
(status = 422, description = "Unprocessable request"),
|
||||
(status = 403, description = "Forbidden"),
|
||||
),
|
||||
tag = "Routing",
|
||||
operation_id = "Update configs for success based dynamic routing algorithm",
|
||||
security(("admin_api_key" = []))
|
||||
)]
|
||||
pub async fn success_based_routing_update_configs() {}
|
||||
|
||||
Reference in New Issue
Block a user