feat(customer_v2): Add customer V2 delete api (#5518)

Co-authored-by: Narayan Bhat <narayan.bhat@juspay.in>
Co-authored-by: hrithikesh026 <hrithikesh.vm@juspay.in>
Co-authored-by: Prajjwal Kumar <prajjwal.kumar@juspay.in>
Co-authored-by: Sanchith Hegde <sanchith.hegde@juspay.in>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Sahkal Poddar <sahkalpoddar@Sahkals-MacBook-Air.local>
This commit is contained in:
Sahkal Poddar
2024-09-05 14:52:43 +05:30
committed by GitHub
parent db04ded4a4
commit a901d67108
24 changed files with 706 additions and 227 deletions

View File

@ -1,10 +1,12 @@
use common_utils::events::{ApiEventMetric, ApiEventsType};
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
use crate::customers::CustomerId;
#[cfg(all(feature = "v2", feature = "customer_v2"))]
use crate::customers::GlobalId;
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
use crate::customers::{CustomerDeleteResponse, CustomerId};
use crate::customers::{CustomerRequest, CustomerResponse, CustomerUpdateRequest};
use crate::customers::{
CustomerDeleteResponse, CustomerRequest, CustomerResponse, CustomerUpdateRequest,
};
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
impl ApiEventMetric for CustomerDeleteResponse {
@ -15,6 +17,15 @@ impl ApiEventMetric for CustomerDeleteResponse {
}
}
#[cfg(all(feature = "v2", feature = "customer_v2"))]
impl ApiEventMetric for CustomerDeleteResponse {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::Customer {
id: self.id.clone(),
})
}
}
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
impl ApiEventMetric for CustomerRequest {
fn get_api_event_type(&self) -> Option<ApiEventsType> {