Issue:
Bug: chore: address Rust 1.77 clippy lints



Address the clippy lints occurring due to new rust version 1.77

See #3391 for more information.

Pull request description:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
This PR addresses the clippy lints occurring due to new rust version 1.77

### 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)?
-->


## 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
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable


Testing:

Patch:
diff --git a/add_connector.md b/add_connector.md
index ac9d3f8d847..96724cb1b01 100644
--- a/add_connector.md
+++ b/add_connector.md
@@ -514,28 +514,23 @@ Within the `ConnectorIntegration` trait, you'll find the following methods imple
   }
 ```
 
-- `get_request_body` method calls transformers where hyperswitch payment request data is transformed into connector payment request. For constructing the request body have a function `log_and_get_request_body` that allows generic argument which is the struct that is passed as the body for connector integration, and a function that can be use to encode it into String. We log the request in this function, as the struct will be intact and the masked values will be masked.
+- `get_request_body` method calls transformers where hyperswitch payment request data is transformed into connector payment request. If the conversion and construction processes are successful, the function wraps the constructed connector_req in a Box and returns it as `RequestContent::Json`. The `RequestContent` enum defines different types of request content that can be sent. It includes variants for JSON, form-urlencoded, XML, raw bytes, and potentially other formats.
 
 ```rust
   fn get_request_body(
-      &self,
-      req: &types::PaymentsAuthorizeRouterData,
-      _connectors: &settings::Connectors,
-  ) -> CustomResult<Option<types::RequestBody>, errors::ConnectorError> {
-      let connector_router_data = checkout::CheckoutRouterData::try_from((
-          &self.get_currency_unit(),
-          req.request.currency,
-          req.request.amount,
-          req,
-      ))?;
-      let connector_req = checkout::PaymentsRequest::try_from(&connector_router_data)?;
-      let checkout_req = types::RequestBody::log_and_get_request_body(
-          &connector_req,
-          utils::Encode::encode_to_string_of_json,
-      )
-      .change_context(errors::ConnectorError::RequestEncodingFailed)?;
-      Ok(Some(checkout_req))
-  }
+        &self,
+        req: &types::PaymentsAuthorizeRouterData,
+        _connectors: &settings::Connectors,
+    ) -> CustomResult<RequestContent, errors::ConnectorError> {
+        let connector_router_data = checkout::CheckoutRouterData::try_from((
+            &self.get_currency_unit(),
+            req.request.currency,
+            req.request.amount,
+            req,
+        ))?;
+        let connector_req = checkout::PaymentsRequest::try_from(&connector_router_data)?;
+        Ok(RequestContent::Json(Box::new(connector_req)))
+    }
 ```
 
 - `build_request` method assembles the API request by providing the method, URL, headers, and request body as parameters.
diff --git a/crates/common_utils/src/lib.rs b/crates/common_utils/src/lib.rs
index 3dbab96408c..b1a708f7a08 100644
--- a/crates/common_utils/src/lib.rs
+++ b/crates/common_utils/src/lib.rs
@@ -35,9 +35,6 @@ pub mod date_time {
         },
         OffsetDateTime, PrimitiveDateTime,
     };
-    /// Struct to represent milliseconds in time sensitive data fields
-    #[derive(Debug)]
-    pub struct Milliseconds(i32);
 
     /// Enum to represent date formats
     #[derive(Debug)]
diff --git a/crates/common_utils/src/request.rs b/crates/common_utils/src/request.rs
index dfd890df795..47f280bc577 100644
--- a/crates/common_utils/src/request.rs
+++ b/crates/common_utils/src/request.rs
@@ -1,10 +1,6 @@
 use masking::{Maskable, Secret};
-#[cfg(feature = "logs")]
-use router_env::logger;
 use serde::{Deserialize, Serialize};
 
-use crate::errors;
-
 pub type Headers = std::collections::HashSet<(String, Maskable<String>)>;
 
 #[derive(
@@ -64,6 +60,18 @@ pub enum RequestContent {
     RawBytes(Vec<u8>),
 }
 
+impl RequestContent {
+    pub fn get_inner_value(&self) -> Secret<String> {
+        match self {
+            Self::Json(i) => serde_json::to_string(&i).unwrap_or_default().into(),
+            Self::FormUrlEncoded(i) => serde_urlencoded::to_string(i).unwrap_or_default().into(),
+            Self::Xml(i) => quick_xml::se::to_string(&i).unwrap_or_default().into(),
+            Self::FormData(_) => String::new().into(),
+            Self::RawBytes(_) => String::new().into(),
+        }
+    }
+}
+
 impl Request {
     pub fn new(method: Method, url: &str) -> Self {
         Self {
@@ -176,33 +184,3 @@ impl Default for RequestBuilder {
         Self::new()
     }
 }
-
-#[derive(Clone, Debug)]
-pub struct RequestBody(Secret<String>);
-
-impl RequestBody {
-    pub fn log_and_get_request_body<T, F>(
-        body: T,
-        encoder: F,
-    ) -> errors::CustomResult<Self, errors::ParsingError>
-    where
-        F: FnOnce(T) -> errors::CustomResult<String, errors::ParsingError>,
-        T: std::fmt::Debug,
-    {
-        #[cfg(feature = "logs")]
-        logger::info!(connector_request_body=?body);
-        Ok(Self(Secret::new(encoder(body)?)))
-    }
-
-    pub fn get_inner_value(request_body: RequestContent) -> Secret<String> {
-        match request_body {
-            RequestContent::Json(i) => serde_json::to_string(&i).unwrap_or_default().into(),
-            RequestContent::FormUrlEncoded(i) => {
-                serde_urlencoded::to_string(&i).unwrap_or_default().into()
-            }
-            RequestContent::Xml(i) => quick_xml::se::to_string(&i).unwrap_or_default().into(),
-            RequestContent::FormData(_) => String::new().into(),
-            RequestContent::RawBytes(_) => String::new().into(),
-        }
-    }
-}
diff --git a/crates/diesel_models/src/process_tracker.rs b/crates/diesel_models/src/process_tracker.rs
index 74fa75a2751..0c6aaa5922f 100644
--- a/crates/diesel_models/src/process_tracker.rs
+++ b/crates/diesel_models/src/process_tracker.rs
@@ -190,27 +190,6 @@ impl From<ProcessTrackerUpdate> for ProcessTrackerUpdateInternal {
     }
 }
 
-#[allow(dead_code)]
-pub struct SchedulerOptions {
-    looper_interval: common_utils::date_time::Milliseconds,
-    db_name: String,
-    cache_name: String,
-    schema_name: String,
-    cache_expiry: i32,
-    runners: Vec<String>,
-    fetch_limit: i32,
-    fetch_limit_product_factor: i32,
-    query_order: String,
-}
-
-#[derive(Debug, Clone)]
-#[allow(dead_code)]
-pub struct ProcessData {
-    db_name: String,
-    cache_name: String,
-    process_tracker: ProcessTracker,
-}
-
 #[derive(
     serde::Serialize,
     serde::Deserialize,
diff --git a/crates/router/src/connector/bankofamerica.rs b/crates/router/src/connector/bankofamerica.rs
index fefc80f806c..aac441201eb 100644
--- a/crates/router/src/connector/bankofamerica.rs
+++ b/crates/router/src/connector/bankofamerica.rs
@@ -140,11 +140,7 @@ where
             .chars()
             .skip(base_url.len() - 1)
             .collect();
-        let sha256 = self.generate_digest(
-            types::RequestBody::get_inner_value(boa_req)
-                .expose()
-                .as_bytes(),
-        );
+        let sha256 = self.generate_digest(boa_req.get_inner_value().expose().as_bytes());
         let signature = self.generate_signature(
             auth,
             host.to_string(),
diff --git a/crates/router/src/connector/checkout/transformers.rs b/crates/router/src/connector/checkout/transformers.rs
index 01ce57d10e1..8004b3b5a12 100644
--- a/crates/router/src/connector/checkout/transformers.rs
+++ b/crates/router/src/connector/checkout/transformers.rs
@@ -1345,7 +1345,7 @@ pub fn construct_file_upload_request(
             request.file_key,
             request
                 .file_type
-                .to_string()
+                .as_ref()
                 .split('/')
                 .last()
                 .unwrap_or_default()
diff --git a/crates/router/src/connector/cryptopay.rs b/crates/router/src/connector/cryptopay.rs
index af33ae21d76..a3335b2e228 100644
--- a/crates/router/src/connector/cryptopay.rs
+++ b/crates/router/src/connector/cryptopay.rs
@@ -77,10 +77,11 @@ where
             | common_utils::request::Method::Put
             | common_utils::request::Method::Delete
             | common_utils::request::Method::Patch => {
-                let body =
-                    types::RequestBody::get_inner_value(self.get_request_body(req, connectors)?)
-                        .peek()
-                        .to_owned();
+                let body = self
+                    .get_request_body(req, connectors)?
+                    .get_inner_value()
+                    .peek()
+                    .to_owned();
                 let md5_payload = crypto::Md5
                     .generate_digest(body.as_bytes())
                     .change_context(errors::ConnectorError::RequestEncodingFailed)?;
diff --git a/crates/router/src/connector/cybersource.rs b/crates/router/src/connector/cybersource.rs
index 2b9b45cdda6..e89810e79cf 100644
--- a/crates/router/src/connector/cybersource.rs
+++ b/crates/router/src/connector/cybersource.rs
@@ -241,11 +241,7 @@ where
             .chars()
             .skip(base_url.len() - 1)
             .collect();
-        let sha256 = self.generate_digest(
-            types::RequestBody::get_inner_value(cybersource_req)
-                .expose()
-                .as_bytes(),
-        );
+        let sha256 = self.generate_digest(cybersource_req.get_inner_value().expose().as_bytes());
         let http_method = self.get_http_method();
         let signature = self.generate_signature(
             auth,
diff --git a/crates/router/src/connector/dlocal.rs b/crates/router/src/connector/dlocal.rs
index 9fdb36ea1dc..b158f239fdd 100644
--- a/crates/router/src/connector/dlocal.rs
+++ b/crates/router/src/connector/dlocal.rs
@@ -68,9 +68,7 @@ where
             "{}{}{}",
             auth.x_login.peek(),
             date,
-            types::RequestBody::get_inner_value(dlocal_req)
-                .peek()
-                .to_owned()
+            dlocal_req.get_inner_value().peek().to_owned()
         );
         let authz = crypto::HmacSha256::sign_message(
             &crypto::HmacSha256,
diff --git a/crates/router/src/connector/fiserv.rs b/crates/router/src/connector/fiserv.rs
index 7db63f5eee5..fdd904ee737 100644
--- a/crates/router/src/connector/fiserv.rs
+++ b/crates/router/src/connector/fiserv.rs
@@ -78,7 +78,7 @@ where
             .generate_authorization_signature(
                 auth,
                 &client_request_id,
-                types::RequestBody::get_inner_value(fiserv_req).peek(),
+                fiserv_req.get_inner_value().peek(),
                 timestamp,
             )
             .change_context(errors::ConnectorError::RequestEncodingFailed)?;
diff --git a/crates/router/src/connector/payeezy.rs b/crates/router/src/connector/payeezy.rs
index 04f180efd08..d24a42085a4 100644
--- a/crates/router/src/connector/payeezy.rs
+++ b/crates/router/src/connector/payeezy.rs
@@ -44,8 +44,10 @@ where
         connectors: &settings::Connectors,
     ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
         let auth = payeezy::PayeezyAuthType::try_from(&req.connector_auth_type)?;
-        let request_payload =
-            types::RequestBody::get_inner_value(self.get_request_body(req, connectors)?).expose();
+        let request_payload = self
+            .get_request_body(req, connectors)?
+            .get_inner_value()
+            .expose();
         let timestamp = std::time::SystemTime::now()
             .duration_since(std::time::UNIX_EPOCH)
             .ok()
diff --git a/crates/router/src/connector/rapyd.rs b/crates/router/src/connector/rapyd.rs
index b487740d07d..fd6de253047 100644
--- a/crates/router/src/connector/rapyd.rs
+++ b/crates/router/src/connector/rapyd.rs
@@ -222,7 +222,7 @@ impl
 
         let auth: rapyd::RapydAuthType = rapyd::RapydAuthType::try_from(&req.connector_auth_type)?;
         let body = types::PaymentsAuthorizeType::get_request_body(self, req, connectors)?;
-        let req_body = types::RequestBody::get_inner_value(body).expose();
+        let req_body = body.get_inner_value().expose();
         let signature =
             self.generate_signature(&auth, "post", "/v1/payments", &req_body, &timestamp, &salt)?;
         let headers = vec![
@@ -555,7 +555,7 @@ impl
             req.request.connector_transaction_id
         );
         let body = types::PaymentsCaptureType::get_request_body(self, req, connectors)?;
-        let req_body = types::RequestBody::get_inner_value(body).expose();
+        let req_body = body.get_inner_value().expose();
         let signature =
             self.generate_signature(&auth, "post", &url_path, &req_body, &timestamp, &salt)?;
         let headers = vec![
@@ -691,7 +691,7 @@ impl services::ConnectorIntegration<api::Execute, types::RefundsData, types::Ref
         let salt = Alphanumeric.sample_string(&mut rand::thread_rng(), 12);
 
         let body = types::RefundExecuteType::get_request_body(self, req, connectors)?;
-        let req_body = types::RequestBody::get_inner_value(body).expose();
+        let req_body = body.get_inner_value().expose();
         let auth: rapyd::RapydAuthType = rapyd::RapydAuthType::try_from(&req.connector_auth_type)?;
         let signature =
             self.generate_signature(&auth, "post", "/v1/refunds", &req_body, &timestamp, &salt)?;
diff --git a/crates/router/src/connector/riskified.rs b/crates/router/src/connector/riskified.rs
index 72a9f6dbdbf..298f8fb1564 100644
--- a/crates/router/src/connector/riskified.rs
+++ b/crates/router/src/connector/riskified.rs
@@ -63,7 +63,7 @@ where
 
         let riskified_req = self.get_request_body(req, connectors)?;
 
-        let binding = types::RequestBody::get_inner_value(riskified_req);
+        let binding = riskified_req.get_inner_value();
         let payload = binding.peek();
 
         let digest = self
diff --git a/crates/router/src/core/mandate.rs b/crates/router/src/core/mandate.rs
index 2838edfbf91..6f022c9fca9 100644
--- a/crates/router/src/core/mandate.rs
+++ b/crates/router/src/core/mandate.rs
@@ -400,7 +400,7 @@ where
                         resp.merchant_id.clone(),
                         resp.payment_id.clone(),
                         resp.connector.clone(),
-                        resp.request.get_setup_mandate_details().map(Clone::clone),
+                        resp.request.get_setup_mandate_details().cloned(),
                         maybe_customer,
                         pm_id.get_required_value("payment_method_id")?,
                         mandate_ids,
diff --git a/crates/router/src/core/payment_methods.rs b/crates/router/src/core/payment_methods.rs
index 26f6d6db193..dd109e99cb9 100644
--- a/crates/router/src/core/payment_methods.rs
+++ b/crates/router/src/core/payment_methods.rs
@@ -7,7 +7,6 @@ pub use api_models::enums::Connector;
 use api_models::payments::CardToken;
 #[cfg(feature = "payouts")]
 pub use api_models::{enums::PayoutConnectors, payouts as payout_types};
-pub use common_utils::request::RequestBody;
 use data_models::payments::{payment_attempt::PaymentAttempt, PaymentIntent};
 use diesel_models::enums;
 
diff --git a/crates/router/src/types.rs b/crates/router/src/types.rs
index 67ad246ba7d..e0ab8131199 100644
--- a/crates/router/src/types.rs
+++ b/crates/router/src/types.rs
@@ -22,7 +22,7 @@ pub use api_models::{enums::Connector, mandates};
 #[cfg(feature = "payouts")]
 pub use api_models::{enums::PayoutConnectors, payouts as payout_types};
 use common_enums::MandateStatus;
-pub use common_utils::request::{RequestBody, RequestContent};
+pub use common_utils::request::RequestContent;
 use common_utils::{pii, pii::Email};
 use data_models::mandates::{CustomerAcceptance, MandateData};
 use error_stack::{IntoReport, ResultExt};
diff --git a/openapi/openapi_spec.json b/openapi/openapi_spec.json
index 28b8f9ef796..1868eb9b4d9 100644
--- a/openapi/openapi_spec.json
+++ b/openapi/openapi_spec.json
@@ -3866,64 +3866,6 @@
         ]
       }
     },
-    "/payouts/list": {
-      "get": {
-        "tags": [
-          "Payouts"
-        ],
-        "summary": "Payouts - List",
-        "description": "Payouts - List",
-        "operationId": "List payouts",
-        "responses": {
-          "200": {
-            "description": "Payouts listed",
-            "content": {
-              "application/json": {
-                "schema": {
-                  "$ref": "#/components/schemas/PayoutListResponse"
-                }
-              }
-            }
-          },
-          "404": {
-            "description": "Payout not found"
-          }
-        },
-        "security": [
-          {
-            "api_key": []
-          }
-        ]
-      },
-      "post": {
-        "tags": [
-          "Payouts"
-        ],
-        "summary": "Payouts - Filter",
-        "description": "Payouts - Filter",
-        "operationId": "Filter payouts",
-        "responses": {
-          "200": {
-            "description": "Payouts filtered",
-            "content": {
-              "application/json": {
-                "schema": {
-                  "$ref": "#/components/schemas/PayoutListResponse"
-                }
-              }
-            }
-          },
-          "404": {
-            "description": "Payout not found"
-          }
-        },
-        "security": [
-          {
-            "api_key": []
-          }
-        ]
-      }
-    },
     "/payouts/{payout_id}": {
       "get": {
         "tags": [
@@ -4116,6 +4058,64 @@
         ]
       }
     },
+    "/payouts/list": {
+      "get": {
+        "tags": [
+          "Payouts"
+        ],
+        "summary": "Payouts - List",
+        "description": "Payouts - List",
+        "operationId": "List payouts",
+        "responses": {
+          "200": {
+            "description": "Payouts listed",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/PayoutListResponse"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Payout not found"
+          }
+        },
+        "security": [
+          {
+            "api_key": []
+          }
+        ]
+      },
+      "post": {
+        "tags": [
+          "Payouts"
+        ],
+        "summary": "Payouts - Filter",
+        "description": "Payouts - Filter",
+        "operationId": "Filter payouts",
+        "responses": {
+          "200": {
+            "description": "Payouts filtered",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/PayoutListResponse"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Payout not found"
+          }
+        },
+        "security": [
+          {
+            "api_key": []
+          }
+        ]
+      }
+    },
     "/api_keys/{merchant_id)": {
       "post": {
         "tags": [