refactor(customers_v2): include minor fixes for customer v2 flows (#6876)

This commit is contained in:
Sanchith Hegde
2024-12-20 13:26:39 +05:30
committed by GitHub
parent 81b324caf1
commit 5cdeaf8e60
5 changed files with 46 additions and 8 deletions

View File

@ -568,7 +568,7 @@ pub async fn delete_customer(
) -> errors::CustomerResponse<customers::CustomerDeleteResponse> {
let db = &*state.store;
let key_manager_state = &(&state).into();
id.fetch_domain_model_and_update_and_generate_delete_customer_response(
id.redact_customer_details_and_generate_response(
db,
&key_store,
&merchant_account,
@ -585,7 +585,7 @@ pub async fn delete_customer(
))]
#[async_trait::async_trait]
impl CustomerDeleteBridge for id_type::GlobalCustomerId {
async fn fetch_domain_model_and_update_and_generate_delete_customer_response<'a>(
async fn redact_customer_details_and_generate_response<'a>(
&'a self,
db: &'a dyn StorageInterface,
key_store: &'a domain::MerchantKeyStore,
@ -717,7 +717,7 @@ impl CustomerDeleteBridge for id_type::GlobalCustomerId {
#[async_trait::async_trait]
trait CustomerDeleteBridge {
async fn fetch_domain_model_and_update_and_generate_delete_customer_response<'a>(
async fn redact_customer_details_and_generate_response<'a>(
&'a self,
db: &'a dyn StorageInterface,
key_store: &'a domain::MerchantKeyStore,
@ -742,7 +742,7 @@ pub async fn delete_customer(
let db = &*state.store;
let key_manager_state = &(&state).into();
customer_id
.fetch_domain_model_and_update_and_generate_delete_customer_response(
.redact_customer_details_and_generate_response(
db,
&key_store,
&merchant_account,
@ -759,7 +759,7 @@ pub async fn delete_customer(
))]
#[async_trait::async_trait]
impl CustomerDeleteBridge for id_type::CustomerId {
async fn fetch_domain_model_and_update_and_generate_delete_customer_response<'a>(
async fn redact_customer_details_and_generate_response<'a>(
&'a self,
db: &'a dyn StorageInterface,
key_store: &'a domain::MerchantKeyStore,

View File

@ -1238,6 +1238,7 @@ where
id: payment_intent.id.clone(),
status: payment_intent.status,
amount,
customer_id: payment_intent.customer_id.clone(),
connector,
client_secret: payment_intent.client_secret.clone(),
created: payment_intent.created_at,
@ -1311,6 +1312,7 @@ where
id: payment_intent.id.clone(),
status: payment_intent.status,
amount,
customer_id: payment_intent.customer_id.clone(),
connector,
billing: payment_address
.get_payment_billing()