refactor: Move CustomerAcceptance to common_types (#8299)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Anurag Thakur
2025-06-25 11:27:09 +05:30
committed by GitHub
parent 2298d487c7
commit 44d93e572f
35 changed files with 194 additions and 267 deletions

View File

@ -1,6 +1,7 @@
use std::str::FromStr;
use api_models::payments;
use common_types::payments as common_payments_types;
use common_utils::{
crypto::Encryptable,
date_time,
@ -765,16 +766,15 @@ impl ForeignTryFrom<(Option<MandateData>, Option<String>)> for Option<payments::
},
))),
},
customer_acceptance: Some(payments::CustomerAcceptance {
acceptance_type: payments::AcceptanceType::Online,
customer_acceptance: Some(common_payments_types::CustomerAcceptance {
acceptance_type: common_payments_types::AcceptanceType::Online,
accepted_at: mandate.customer_acceptance.accepted_at,
online: mandate
.customer_acceptance
.online
.map(|online| payments::OnlineMandate {
online: mandate.customer_acceptance.online.map(|online| {
common_payments_types::OnlineMandate {
ip_address: Some(online.ip_address),
user_agent: online.user_agent,
}),
}
}),
}),
update_mandate_id: None,
});