feat(core): Add service details field in authentication table (#6757)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sahkal Poddar
2024-12-12 17:31:41 +05:30
committed by GitHub
parent 573fc2ce0f
commit e9a5615f2b
30 changed files with 136 additions and 4 deletions

View File

@ -47,6 +47,7 @@ pub struct Authentication {
pub ds_trans_id: Option<String>,
pub directory_server_id: Option<String>,
pub acquirer_country_code: Option<String>,
pub service_details: Option<serde_json::Value>,
}
impl Authentication {
@ -94,6 +95,7 @@ pub struct AuthenticationNew {
pub ds_trans_id: Option<String>,
pub directory_server_id: Option<String>,
pub acquirer_country_code: Option<String>,
pub service_details: Option<serde_json::Value>,
}
#[derive(Debug)]
@ -190,6 +192,7 @@ pub struct AuthenticationUpdateInternal {
pub ds_trans_id: Option<String>,
pub directory_server_id: Option<String>,
pub acquirer_country_code: Option<String>,
pub service_details: Option<serde_json::Value>,
}
impl Default for AuthenticationUpdateInternal {
@ -223,6 +226,7 @@ impl Default for AuthenticationUpdateInternal {
ds_trans_id: Default::default(),
directory_server_id: Default::default(),
acquirer_country_code: Default::default(),
service_details: Default::default(),
}
}
}
@ -258,6 +262,7 @@ impl AuthenticationUpdateInternal {
ds_trans_id,
directory_server_id,
acquirer_country_code,
service_details,
} = self;
Authentication {
connector_authentication_id: connector_authentication_id
@ -292,6 +297,7 @@ impl AuthenticationUpdateInternal {
ds_trans_id: ds_trans_id.or(source.ds_trans_id),
directory_server_id: directory_server_id.or(source.directory_server_id),
acquirer_country_code: acquirer_country_code.or(source.acquirer_country_code),
service_details: service_details.or(source.service_details),
..source
}
}