mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 17:47:54 +08:00
feat(customer_v2): customer v2 refactor customer v2 update endpoint (#5490)
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>
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
use common_utils::events::{ApiEventMetric, ApiEventsType};
|
||||
|
||||
use crate::customers::{CustomerDeleteResponse, CustomerId, CustomerRequest, CustomerResponse};
|
||||
use crate::customers::{
|
||||
CustomerDeleteResponse, CustomerId, CustomerRequest, CustomerResponse, CustomerUpdateRequest,
|
||||
};
|
||||
|
||||
impl ApiEventMetric for CustomerDeleteResponse {
|
||||
fn get_api_event_type(&self) -> Option<ApiEventsType> {
|
||||
@ -33,3 +35,12 @@ impl ApiEventMetric for CustomerId {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl ApiEventMetric for CustomerUpdateRequest {
|
||||
fn get_api_event_type(&self) -> Option<ApiEventsType> {
|
||||
self.get_merchant_reference_id()
|
||||
.clone()
|
||||
.map(|cid| ApiEventsType::Customer { customer_id: cid })
|
||||
}
|
||||
}
|
||||
// These needs to be fixed for v2
|
||||
|
||||
Reference in New Issue
Block a user