Bug: [REFACTOR] provide an identifier for the api key in the expiry reminder email



### Issue Description:

Currently, our system sends out reminder emails to merchants when their API key is about to expire. However, since merchants can create multiple API keys, the email lacks clarity on which specific API key is expiring.

### Proposed Solution:

Refactor the api key expiry reminder workflow to include the name and prefix of the expiring API key in email. This will help merchants easily identify which API key requires attention without confusion.

### Details:

Update the email template to include the following information:
API Key Name along with Prefix in below format -
`API_KEY_NAME [PREFIX]`

### Reference:
Check `ApiKeyExpiryTrackingData` type in https://github.com/juspay/hyperswitch/blob/2c95dcd19778726f476b219271dc42da182088af/crates/diesel_models/src/api_keys.rs 


diff --git a/crates/diesel_models/src/api_keys.rs b/crates/diesel_models/src/api_keys.rs
index 1875fc4dc51..7676e20d224 100644
--- a/crates/diesel_models/src/api_keys.rs
+++ b/crates/diesel_models/src/api_keys.rs
@@ -141,6 +141,8 @@ mod diesel_impl {
 pub struct ApiKeyExpiryTrackingData {
     pub key_id: String,
     pub merchant_id: String,
+    pub api_key_name: String,
+    pub prefix: String,
     pub api_key_expiry: Option<PrimitiveDateTime>,
     // Days on which email reminder about api_key expiry has to be sent, prior to it's expiry.
     pub expiry_reminder_days: Vec<u8>,
diff --git a/crates/router/src/core/api_keys.rs b/crates/router/src/core/api_keys.rs
index 7d2069618d5..a2fcacb3b3d 100644
--- a/crates/router/src/core/api_keys.rs
+++ b/crates/router/src/core/api_keys.rs
@@ -207,6 +207,8 @@ pub async fn add_api_key_expiry_task(
     let api_key_expiry_tracker = storage::ApiKeyExpiryTrackingData {
         key_id: api_key.key_id.clone(),
         merchant_id: api_key.merchant_id.clone(),
+        api_key_name: api_key.name.clone(),
+        prefix: api_key.prefix.clone(),
         // We need API key expiry too, because we need to decide on the schedule_time in
         // execute_workflow() where we won't be having access to the Api key object.
         api_key_expiry: api_key.expires_at,
@@ -369,6 +371,8 @@ pub async fn update_api_key_expiry_task(
     let updated_tracking_data = &storage::ApiKeyExpiryTrackingData {
         key_id: api_key.key_id.clone(),
         merchant_id: api_key.merchant_id.clone(),
+        api_key_name: api_key.name.clone(),
+        prefix: api_key.prefix.clone(),
         api_key_expiry: api_key.expires_at,
         expiry_reminder_days,
     };
diff --git a/crates/router/src/services/email/assets/api_key_expiry_reminder.html b/crates/router/src/services/email/assets/api_key_expiry_reminder.html
index 1865ae38141..772602d71e7 100644
--- a/crates/router/src/services/email/assets/api_key_expiry_reminder.html
+++ b/crates/router/src/services/email/assets/api_key_expiry_reminder.html
@@ -43,20 +43,7 @@
       cellpadding="0"
       cellspacing="0"
     >
-      <tr>
-        <td
-          class="spacer-lg"
-          style="
-            -premailer-height: 75;
-            -premailer-width: 100%;
-            line-height: 30px;
-            margin: 0 auto;
-            padding: 0;
-          "
-          height="75"
-          width="100%"
-        ></td>
-      </tr>
+      
       <tr>
         <td
           class="spacer-lg"
@@ -96,13 +83,13 @@
             line-height: 36px;
             margin: 0 auto;
             padding: 0;
-            text-align: center;
+            text-align: left;
           "
           align="center"
         >
         <p style="font-size: 18px">Dear Merchant,</p>
         <span style="font-size: 18px">
-          It has come to our attention that your API key will expire in {expires_in} days. To ensure uninterrupted
+          It has come to our attention that your API key, <b>{api_key_name}</b> (<code>{prefix}*****</code>) </code> will expire in {expires_in} days. To ensure uninterrupted
           access to our platform and continued smooth operation of your services, we kindly request that you take the
           necessary actions as soon as possible.
         </span>
@@ -118,39 +105,11 @@
             margin: 0 auto;
             padding: 0;
           "
-          width="100%"
-        ></td>
-      </tr>
-      
-      <tr>
-        <td
-          class="spacer-sm"
-          style="
-            -premailer-height: 20;
-            -premailer-width: 100%;
-            line-height: 10px;
-            margin: 0 auto;
-            padding: 0;
-          "
           height="20"
           width="100%"
         ></td>
       </tr>
 
-      <tr>
-        <td
-          class="spacer-lg"
-          style="
-            -premailer-height: 75;
-            -premailer-width: 100%;
-            line-height: 30px;
-            margin: 0 auto;
-            padding: 0;
-          "
-          height="75"
-          width="100%"
-        ></td>
-      </tr>
       <tr>
         <td
           class="headline"
@@ -162,7 +121,7 @@
             line-height: 36px;
             margin: 0 auto;
             padding: 0;
-            text-align: center;
+            text-align: left;
           "
           align="center"
         >
@@ -184,20 +143,7 @@
           width="100%"
         ></td>
       </tr>
-      <tr>
-        <td
-          class="spacer-lg"
-          style="
-            -premailer-height: 75;
-            -premailer-width: 100%;
-            line-height: 30px;
-            margin: 0 auto;
-            padding: 0;
-          "
-          height="75"
-          width="100%"
-        ></td>
-      </tr>
+      
     </table>
   </div>
 </body>
diff --git a/crates/router/src/services/email/types.rs b/crates/router/src/services/email/types.rs
index fa1eecbaab8..2fbe7d606e5 100644
--- a/crates/router/src/services/email/types.rs
+++ b/crates/router/src/services/email/types.rs
@@ -50,6 +50,8 @@ pub enum EmailBody {
     },
     ApiKeyExpiryReminder {
         expires_in: u8,
+        api_key_name: String,
+        prefix: String,
     },
 }
 
@@ -128,8 +130,14 @@ Email         : {user_email}
 
 (note: This is an auto generated email. Use merchant email for any further communications)",
             ),
-            EmailBody::ApiKeyExpiryReminder { expires_in } => format!(
+            EmailBody::ApiKeyExpiryReminder {
+                expires_in,
+                api_key_name,
+                prefix,
+            } => format!(
                 include_str!("assets/api_key_expiry_reminder.html"),
+                api_key_name = api_key_name,
+                prefix = prefix,
                 expires_in = expires_in,
             ),
         }
@@ -441,6 +449,8 @@ pub struct ApiKeyExpiryReminder {
     pub recipient_email: domain::UserEmail,
     pub subject: &'static str,
     pub expires_in: u8,
+    pub api_key_name: String,
+    pub prefix: String,
 }
 
 #[async_trait::async_trait]
@@ -450,6 +460,8 @@ impl EmailData for ApiKeyExpiryReminder {
 
         let body = html::get_html_body(EmailBody::ApiKeyExpiryReminder {
             expires_in: self.expires_in,
+            api_key_name: self.api_key_name.clone(),
+            prefix: self.prefix.clone(),
         });
 
         Ok(EmailContents {
diff --git a/crates/router/src/workflows/api_key_expiry.rs b/crates/router/src/workflows/api_key_expiry.rs
index e9e1f323708..c5914810108 100644
--- a/crates/router/src/workflows/api_key_expiry.rs
+++ b/crates/router/src/workflows/api_key_expiry.rs
@@ -54,6 +54,10 @@ impl ProcessTrackerWorkflow<AppState> for ApiKeyExpiryWorkflow {
 
         let retry_count = process.retry_count;
 
+        let api_key_name = tracking_data.api_key_name.clone();
+
+        let prefix = tracking_data.prefix.clone();
+
         let expires_in = tracking_data
             .expiry_reminder_days
             .get(
@@ -69,6 +73,9 @@ impl ProcessTrackerWorkflow<AppState> for ApiKeyExpiryWorkflow {
             })?,
             subject: "API Key Expiry Notice",
             expires_in: *expires_in,
+            api_key_name,
+            prefix,
+
         };
 
         state

## 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 -->
Refactored the api key expiry reminder workflow to include the name and prefix of the expiring API key in the email

### 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 the issue #3801 

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).
-->
It fixes #3801 

## 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 merchant account
2. Create an api key with expiry somewhat closer to 7 days from current time in UTC format.
3. You should get an email something like below once api key expiry is exactly 7 days from current time

![image](https://github.com/juspay/hyperswitch/assets/70657455/41d40ff4-7db4-4d22-bfdd-8eabd2a35f41)


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

- [x] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
