diff --git a/crates/router/src/connector/bankofamerica/transformers.rs b/crates/router/src/connector/bankofamerica/transformers.rs index 5c8aec1686..1230843afa 100644 --- a/crates/router/src/connector/bankofamerica/transformers.rs +++ b/crates/router/src/connector/bankofamerica/transformers.rs @@ -884,7 +884,7 @@ pub struct Profile { #[derive(Debug, Clone, Deserialize, Serialize)] pub struct ClientRiskInformationRules { - name: Secret, + name: Option>, } #[derive(Debug, Clone, Serialize, Deserialize)] @@ -2961,7 +2961,11 @@ impl client_risk_information.rules.map(|rules| { rules .iter() - .map(|risk_info| format!(" , {}", risk_info.name.clone().expose())) + .map(|risk_info| { + risk_info.name.clone().map_or("".to_string(), |name| { + format!(" , {}", name.clone().expose()) + }) + }) .collect::>() .join("") }) diff --git a/crates/router/src/connector/cybersource/transformers.rs b/crates/router/src/connector/cybersource/transformers.rs index b51bb5f4eb..44e82a036a 100644 --- a/crates/router/src/connector/cybersource/transformers.rs +++ b/crates/router/src/connector/cybersource/transformers.rs @@ -1839,7 +1839,7 @@ pub struct ClientRiskInformation { #[derive(Debug, Clone, Deserialize, Serialize)] pub struct ClientRiskInformationRules { - name: Secret, + name: Option>, } #[derive(Debug, Clone, Deserialize, Serialize)] @@ -3402,7 +3402,11 @@ impl client_risk_information.rules.map(|rules| { rules .iter() - .map(|risk_info| format!(" , {}", risk_info.name.clone().expose())) + .map(|risk_info| { + risk_info.name.clone().map_or("".to_string(), |name| { + format!(" , {}", name.clone().expose()) + }) + }) .collect::>() .join("") })