feat(router): add confirm flag in kafka payment intent events (#8432)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sai Harsha Vardhan
2025-06-24 14:04:48 +05:30
committed by GitHub
parent 62ec934cf8
commit bc767b9131
5 changed files with 41 additions and 2 deletions

View File

@ -52,6 +52,25 @@ pub struct KeyManagerState {
pub infra_values: Option<serde_json::Value>,
}
impl KeyManagerState {
pub fn add_confirm_value_in_infra_values(
&self,
is_confirm_operation: bool,
) -> Option<serde_json::Value> {
self.infra_values.clone().map(|mut infra_values| {
if is_confirm_operation {
infra_values.as_object_mut().map(|obj| {
obj.insert(
"is_confirm_operation".to_string(),
serde_json::Value::Bool(true),
)
});
}
infra_values
})
}
}
pub trait GetKeymanagerTenant {
fn get_tenant_id(&self, state: &KeyManagerState) -> id_type::TenantId;
}