refactor(merchant_id): create domain type for merchant_id (#5408)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
Narayan Bhat
2024-07-24 19:18:25 +05:30
committed by GitHub
parent e18ea7a7ba
commit 7068fbfbe2
406 changed files with 3168 additions and 2633 deletions

View File

@ -2,10 +2,12 @@
use std::fmt::Display;
use crate::id_type;
/// Create a key for fetching the access token from redis
pub fn create_access_token_key(
merchant_id: impl Display,
merchant_id: &id_type::MerchantId,
merchant_connector_id_or_connector_name: impl Display,
) -> String {
format!("access_token_{merchant_id}_{merchant_connector_id_or_connector_name}")
merchant_id.get_access_token_key(merchant_connector_id_or_connector_name)
}