Bug: [REFACTOR] change the response type of update gateway score api in open router




diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.json
index bb4db422556..d43ddadc54c 100644
--- a/api-reference-v2/openapi_spec.json
+++ b/api-reference-v2/openapi_spec.json
@@ -9482,6 +9482,7 @@
           "customer_id",
           "payment_method_type",
           "payment_method_subtype",
+          "recurring_enabled",
           "created",
           "requires_cvv",
           "last_used_at",
@@ -9513,9 +9514,8 @@
           },
           "recurring_enabled": {
             "type": "boolean",
-            "description": "Indicates whether the payment method supports recurring payments. Optional.",
-            "example": true,
-            "nullable": true
+            "description": "Indicates whether the payment method is eligible for recurring payments",
+            "example": true
           },
           "payment_method_data": {
             "allOf": [
@@ -17142,7 +17142,6 @@
           "customer_id",
           "payment_method_type",
           "payment_method_subtype",
-          "recurring_enabled",
           "created",
           "requires_cvv",
           "is_default",
@@ -17169,8 +17168,9 @@
           },
           "recurring_enabled": {
             "type": "boolean",
-            "description": "Indicates whether the payment method is eligible for recurring payments",
-            "example": true
+            "description": "Indicates whether the payment method supports recurring payments. Optional.",
+            "example": true,
+            "nullable": true
           },
           "payment_method_data": {
             "allOf": [
diff --git a/crates/api_models/src/open_router.rs b/crates/api_models/src/open_router.rs
index cfcb45ef97b..08607e1469b 100644
--- a/crates/api_models/src/open_router.rs
+++ b/crates/api_models/src/open_router.rs
@@ -148,6 +148,11 @@ pub struct UpdateScorePayload {
     pub payment_id: id_type::PaymentId,
 }
 
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct UpdateScoreResponse {
+    pub message: String,
+}
+
 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
 #[serde(rename_all = "SCREAMING_SNAKE_CASE")]
 pub enum TxnStatus {
diff --git a/crates/router/src/core/payments/routing.rs b/crates/router/src/core/payments/routing.rs
index c36de4fb633..f08e76469dc 100644
--- a/crates/router/src/core/payments/routing.rs
+++ b/crates/router/src/core/payments/routing.rs
@@ -1958,11 +1958,12 @@ pub async fn update_gateway_score_with_open_router(
 
     match response {
         Ok(resp) => {
-            let update_score_resp = String::from_utf8(resp.response.to_vec()).change_context(
-                errors::RoutingError::OpenRouterError(
+            let update_score_resp = resp
+                .response
+                .parse_struct::<or_types::UpdateScoreResponse>("UpdateScoreResponse")
+                .change_context(errors::RoutingError::OpenRouterError(
                     "Failed to parse the response from open_router".into(),
-                ),
-            )?;
+                ))?;
 
             logger::debug!(
                 "open_router update_gateway_score response for gateway with id {}: {:?}",

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

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

## Description
A new struct, UpdateScoreResponse, was introduced in the API models to represent responses from the Open Router. The payment routing logic was updated to parse responses directly into this struct, replacing the previous manual string conversion and error handling with structured deserialization.

### 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)?
-->
Cannot be tested until open_router is enabled in runtime.

Tested locally - Response is getting deserialized
![image](https://github.com/user-attachments/assets/51117d21-74b2-4a34-811f-99d9c95e226f)


## 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


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
  - Introduced a new response format for score updates, providing clear messaging after updating gateway scores.
  - Updated payment method responses to clarify recurring payment eligibility and support.

- **Refactor**
  - Improved the way score update responses are processed for greater reliability and clarity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->