Bug: make `is_debit_routing_enabled` optional in profile general update



is_debit_routing_enabled field is a business profile field introduced in this [pr](https://github.com/juspay/hyperswitch/pull/7470). It is made a mandatory field in the business profile update and is being set as false in case of RoutingAlgorithmUpdate. 

This field needs to be made a optional in the business profile update call and set to None in the other business profile updates 
diff --git a/crates/diesel_models/src/business_profile.rs b/crates/diesel_models/src/business_profile.rs
index 4cb36d5685c..0bc52b33189 100644
--- a/crates/diesel_models/src/business_profile.rs
+++ b/crates/diesel_models/src/business_profile.rs
@@ -178,7 +178,7 @@ pub struct ProfileUpdateInternal {
     pub card_testing_secret_key: Option<Encryption>,
     pub is_clear_pan_retries_enabled: Option<bool>,
     pub force_3ds_challenge: Option<bool>,
-    pub is_debit_routing_enabled: bool,
+    pub is_debit_routing_enabled: Option<bool>,
     pub merchant_business_country: Option<common_enums::CountryAlpha2>,
     pub is_iframe_redirection_enabled: Option<bool>,
     pub is_pre_network_tokenization_enabled: Option<bool>,
@@ -306,7 +306,8 @@ impl ProfileUpdateInternal {
                 .unwrap_or(source.is_clear_pan_retries_enabled),
             force_3ds_challenge,
             id: source.id,
-            is_debit_routing_enabled,
+            is_debit_routing_enabled: is_debit_routing_enabled
+                .unwrap_or(source.is_debit_routing_enabled),
             merchant_business_country: merchant_business_country
                 .or(source.merchant_business_country),
             is_iframe_redirection_enabled: is_iframe_redirection_enabled
@@ -502,7 +503,7 @@ pub struct ProfileUpdateInternal {
     pub card_testing_guard_config: Option<CardTestingGuardConfig>,
     pub card_testing_secret_key: Option<Encryption>,
     pub is_clear_pan_retries_enabled: Option<bool>,
-    pub is_debit_routing_enabled: bool,
+    pub is_debit_routing_enabled: Option<bool>,
     pub merchant_business_country: Option<common_enums::CountryAlpha2>,
     pub routing_algorithm_id: Option<common_utils::id_type::RoutingId>,
     pub order_fulfillment_time: Option<i64>,
@@ -649,7 +650,8 @@ impl ProfileUpdateInternal {
             is_clear_pan_retries_enabled: is_clear_pan_retries_enabled
                 .unwrap_or(source.is_clear_pan_retries_enabled),
             force_3ds_challenge: None,
-            is_debit_routing_enabled,
+            is_debit_routing_enabled: is_debit_routing_enabled
+                .unwrap_or(source.is_debit_routing_enabled),
             merchant_business_country: merchant_business_country
                 .or(source.merchant_business_country),
             revenue_recovery_retry_algorithm_type: revenue_recovery_retry_algorithm_type
diff --git a/crates/hyperswitch_domain_models/src/business_profile.rs b/crates/hyperswitch_domain_models/src/business_profile.rs
index f7dd3f9539d..8e5de204fba 100644
--- a/crates/hyperswitch_domain_models/src/business_profile.rs
+++ b/crates/hyperswitch_domain_models/src/business_profile.rs
@@ -244,7 +244,7 @@ pub struct ProfileGeneralUpdate {
     pub card_testing_secret_key: OptionalEncryptableName,
     pub is_clear_pan_retries_enabled: Option<bool>,
     pub force_3ds_challenge: Option<bool>,
-    pub is_debit_routing_enabled: bool,
+    pub is_debit_routing_enabled: Option<bool>,
     pub merchant_business_country: Option<api_enums::CountryAlpha2>,
     pub is_iframe_redirection_enabled: Option<bool>,
     pub is_pre_network_tokenization_enabled: Option<bool>,
@@ -420,7 +420,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
                 force_3ds_challenge: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 is_iframe_redirection_enabled: None,
                 is_pre_network_tokenization_enabled: None,
@@ -469,7 +469,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
                 force_3ds_challenge: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 is_iframe_redirection_enabled: None,
                 is_pre_network_tokenization_enabled: None,
@@ -518,7 +518,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
                 force_3ds_challenge: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 is_iframe_redirection_enabled: None,
                 is_pre_network_tokenization_enabled: None,
@@ -567,7 +567,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
                 force_3ds_challenge: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 is_iframe_redirection_enabled: None,
                 is_pre_network_tokenization_enabled: None,
@@ -616,7 +616,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
                 force_3ds_challenge: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 is_iframe_redirection_enabled: None,
                 is_pre_network_tokenization_enabled: None,
@@ -665,7 +665,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_secret_key: card_testing_secret_key.map(Encryption::from),
                 is_clear_pan_retries_enabled: None,
                 force_3ds_challenge: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 is_iframe_redirection_enabled: None,
                 is_pre_network_tokenization_enabled: None,
@@ -1140,7 +1140,7 @@ pub struct ProfileGeneralUpdate {
     pub three_ds_decision_manager_config: Option<common_types::payments::DecisionManagerRecord>,
     pub card_testing_guard_config: Option<CardTestingGuardConfig>,
     pub card_testing_secret_key: OptionalEncryptableName,
-    pub is_debit_routing_enabled: bool,
+    pub is_debit_routing_enabled: Option<bool>,
     pub merchant_business_country: Option<api_enums::CountryAlpha2>,
     pub is_iframe_redirection_enabled: Option<bool>,
     pub is_external_vault_enabled: Option<bool>,
@@ -1321,7 +1321,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_guard_config: None,
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 revenue_recovery_retry_algorithm_type: None,
                 revenue_recovery_retry_algorithm_data: None,
@@ -1373,7 +1373,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_guard_config: None,
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 revenue_recovery_retry_algorithm_type: None,
                 revenue_recovery_retry_algorithm_data: None,
@@ -1425,7 +1425,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_guard_config: None,
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 revenue_recovery_retry_algorithm_type: None,
                 revenue_recovery_retry_algorithm_data: None,
@@ -1477,7 +1477,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_guard_config: None,
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 revenue_recovery_retry_algorithm_type: None,
                 revenue_recovery_retry_algorithm_data: None,
@@ -1529,7 +1529,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_guard_config: None,
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 revenue_recovery_retry_algorithm_type: None,
                 revenue_recovery_retry_algorithm_data: None,
@@ -1581,7 +1581,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_guard_config: None,
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 revenue_recovery_retry_algorithm_type: None,
                 revenue_recovery_retry_algorithm_data: None,
@@ -1633,7 +1633,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_guard_config: None,
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 revenue_recovery_retry_algorithm_type: None,
                 revenue_recovery_retry_algorithm_data: None,
@@ -1685,7 +1685,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_guard_config: None,
                 card_testing_secret_key: card_testing_secret_key.map(Encryption::from),
                 is_clear_pan_retries_enabled: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 revenue_recovery_retry_algorithm_type: None,
                 revenue_recovery_retry_algorithm_data: None,
@@ -1738,7 +1738,7 @@ impl From<ProfileUpdate> for ProfileUpdateInternal {
                 card_testing_guard_config: None,
                 card_testing_secret_key: None,
                 is_clear_pan_retries_enabled: None,
-                is_debit_routing_enabled: false,
+                is_debit_routing_enabled: None,
                 merchant_business_country: None,
                 revenue_recovery_retry_algorithm_type: Some(revenue_recovery_retry_algorithm_type),
                 revenue_recovery_retry_algorithm_data,
diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rs
index 860d82ab487..68e91511d36 100644
--- a/crates/router/src/core/admin.rs
+++ b/crates/router/src/core/admin.rs
@@ -4426,7 +4426,7 @@ impl ProfileUpdateBridge for api::ProfileUpdate {
                 card_testing_secret_key,
                 is_clear_pan_retries_enabled: self.is_clear_pan_retries_enabled,
                 force_3ds_challenge: self.force_3ds_challenge, //
-                is_debit_routing_enabled: self.is_debit_routing_enabled.unwrap_or_default(),
+                is_debit_routing_enabled: self.is_debit_routing_enabled,
                 merchant_business_country: self.merchant_business_country,
                 is_iframe_redirection_enabled: self.is_iframe_redirection_enabled,
                 is_pre_network_tokenization_enabled: self.is_pre_network_tokenization_enabled,
@@ -4562,7 +4562,7 @@ impl ProfileUpdateBridge for api::ProfileUpdate {
                     .card_testing_guard_config
                     .map(ForeignInto::foreign_into),
                 card_testing_secret_key,
-                is_debit_routing_enabled: self.is_debit_routing_enabled.unwrap_or_default(),
+                is_debit_routing_enabled: self.is_debit_routing_enabled,
                 merchant_business_country: self.merchant_business_country,
                 is_iframe_redirection_enabled: None,
                 is_external_vault_enabled: self.is_external_vault_enabled,

## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD


## Description
<!-- Describe your changes in detail -->
is_debit_routing_enabled field is a business profile field introduced in this [pr](https://github.com/juspay/hyperswitch/pull/7470). It is made a mandatory field in the business profile update and is being set as false in case of RoutingAlgorithmUpdate. 

This field needs to be made a optional in the business profile update call and set to None in the other business profile updates

### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables

<!--
Provide links to the files with corresponding changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->


## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->

1. Create a business profile and set `is_debit_routing_enabled` to true
```
curl --location 'http://localhost:8080/account/merchant_1747852121/business_profile/pro_dJ37X4BXujuveLBLSZAV' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: <api-key>' \
--data '{
    "is_debit_routing_enabled": true
}'
```
```
{
    "merchant_id": "merchant_1747852121",
    "profile_id": "pro_dJ37X4BXujuveLBLSZAV",
    "profile_name": "US_default",
    "return_url": "https://google.com/success",
    "enable_payment_response_hash": true,
    "payment_response_hash_key": "tyNDlBZHJ4iiykQMSG5HWQrp9E6kP7QZKoi8fILj6REqeHA96RbASElSSAjS1jZU",
    "redirect_to_merchant_with_http_post": false,
    "webhook_details": {
        "webhook_version": "1.0.1",
        "webhook_username": "ekart_retail",
        "webhook_password": "password_ekart@123",
        "webhook_url": null,
        "payment_created_enabled": true,
        "payment_succeeded_enabled": true,
        "payment_failed_enabled": true
    },
    "metadata": null,
    "routing_algorithm": null,
    "intent_fulfillment_time": 900,
    "frm_routing_algorithm": null,
    "payout_routing_algorithm": null,
    "applepay_verified_domains": null,
    "session_expiry": 900,
    "payment_link_config": null,
    "authentication_connector_details": null,
    "use_billing_as_payment_method_billing": true,
    "extended_card_info_config": null,
    "collect_shipping_details_from_wallet_connector": false,
    "collect_billing_details_from_wallet_connector": false,
    "always_collect_shipping_details_from_wallet_connector": false,
    "always_collect_billing_details_from_wallet_connector": false,
    "is_connector_agnostic_mit_enabled": false,
    "payout_link_config": null,
    "outgoing_webhook_custom_http_headers": null,
    "tax_connector_id": null,
    "is_tax_connector_enabled": false,
    "is_network_tokenization_enabled": false,
    "is_auto_retries_enabled": false,
    "max_auto_retries_enabled": null,
    "always_request_extended_authorization": null,
    "is_click_to_pay_enabled": false,
    "authentication_product_ids": null,
    "card_testing_guard_config": {
        "card_ip_blocking_status": "disabled",
        "card_ip_blocking_threshold": 3,
        "guest_user_card_blocking_status": "disabled",
        "guest_user_card_blocking_threshold": 10,
        "customer_id_blocking_status": "disabled",
        "customer_id_blocking_threshold": 5,
        "card_testing_guard_expiry": 3600
    },
    "is_clear_pan_retries_enabled": false,
    "force_3ds_challenge": false,
    "is_debit_routing_enabled": true,
    "merchant_business_country": null,
    "is_pre_network_tokenization_enabled": false
}
```
2. update business profile by enabling feature other than debit routing. After this debit routing should still be true
```
curl --location 'http://localhost:8080/account/merchant_1747852121/business_profile/pro_dJ37X4BXujuveLBLSZAV' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: <api-key>' \
--data '{
    "is_connector_agnostic_mit_enabled": false
}'
```
```
{
  "merchant_id": "merchant_1747852121",
  "profile_id": "pro_dJ37X4BXujuveLBLSZAV",
  "profile_name": "US_default",
  "return_url": "https://google.com/success",
  "enable_payment_response_hash": true,
  "payment_response_hash_key": "tyNDlBZHJ4iiykQMSG5HWQrp9E6kP7QZKoi8fILj6REqeHA96RbASElSSAjS1jZU",
  "redirect_to_merchant_with_http_post": false,
  "webhook_details": {
    "webhook_version": "1.0.1",
    "webhook_username": "ekart_retail",
    "webhook_password": "password_ekart@123",
    "webhook_url": null,
    "payment_created_enabled": true,
    "payment_succeeded_enabled": true,
    "payment_failed_enabled": true
  },
  "metadata": null,
  "routing_algorithm": null,
  "intent_fulfillment_time": 900,
  "frm_routing_algorithm": null,
  "payout_routing_algorithm": null,
  "applepay_verified_domains": null,
  "session_expiry": 900,
  "payment_link_config": null,
  "authentication_connector_details": null,
  "use_billing_as_payment_method_billing": true,
  "extended_card_info_config": null,
  "collect_shipping_details_from_wallet_connector": false,
  "collect_billing_details_from_wallet_connector": false,
  "always_collect_shipping_details_from_wallet_connector": false,
  "always_collect_billing_details_from_wallet_connector": false,
  "is_connector_agnostic_mit_enabled": false,
  "payout_link_config": null,
  "outgoing_webhook_custom_http_headers": null,
  "tax_connector_id": null,
  "is_tax_connector_enabled": false,
  "is_network_tokenization_enabled": false,
  "is_auto_retries_enabled": false,
  "max_auto_retries_enabled": null,
  "always_request_extended_authorization": null,
  "is_click_to_pay_enabled": false,
  "authentication_product_ids": null,
  "card_testing_guard_config": {
    "card_ip_blocking_status": "disabled",
    "card_ip_blocking_threshold": 3,
    "guest_user_card_blocking_status": "disabled",
    "guest_user_card_blocking_threshold": 10,
    "customer_id_blocking_status": "disabled",
    "customer_id_blocking_threshold": 5,
    "card_testing_guard_expiry": 3600
  },
  "is_clear_pan_retries_enabled": false,
  "force_3ds_challenge": false,
  "is_debit_routing_enabled": true,
  "merchant_business_country": null,
  "is_pre_network_tokenization_enabled": false
}
```


## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
