feat: add routing support for v2 sdk session flow (#6763)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Hrithikesh
2025-03-26 13:47:52 +05:30
committed by GitHub
parent d58685071b
commit c3e8c67bfa
65 changed files with 3470 additions and 3993 deletions

View File

@ -188,15 +188,20 @@ pub async fn create_routing_algorithm_under_profile(
)
.await?
.get_required_value("Profile")?;
let merchant_id = merchant_account.get_id();
core_utils::validate_profile_id_from_auth_layer(authentication_profile_id, &business_profile)?;
let all_mcas = helpers::MerchantConnectorAccounts::get_all_mcas(
merchant_account.get_id(),
&key_store,
&state,
)
.await?;
let all_mcas = state
.store
.find_merchant_connector_account_by_merchant_id_and_disabled_list(
key_manager_state,
merchant_id,
true,
&key_store,
)
.await
.change_context(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {
id: merchant_id.get_string_repr().to_owned(),
})?;
let name_mca_id_set = helpers::ConnectNameAndMCAIdForProfile(
all_mcas.filter_by_profile(business_profile.get_id(), |mca| {