mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 02:57:02 +08:00
feat(customer): customer v2 refactor for customer create end point (#5350)
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:
@ -12,7 +12,7 @@ impl ApiEventMetric for CustomerDeleteResponse {
|
||||
|
||||
impl ApiEventMetric for CustomerRequest {
|
||||
fn get_api_event_type(&self) -> Option<ApiEventsType> {
|
||||
self.customer_id
|
||||
self.get_merchant_reference_id()
|
||||
.clone()
|
||||
.map(|customer_id| ApiEventsType::Customer { customer_id })
|
||||
}
|
||||
@ -20,16 +20,16 @@ impl ApiEventMetric for CustomerRequest {
|
||||
|
||||
impl ApiEventMetric for CustomerResponse {
|
||||
fn get_api_event_type(&self) -> Option<ApiEventsType> {
|
||||
Some(ApiEventsType::Customer {
|
||||
customer_id: self.customer_id.clone(),
|
||||
})
|
||||
self.get_merchant_reference_id()
|
||||
.clone()
|
||||
.map(|cid| ApiEventsType::Customer { customer_id: cid })
|
||||
}
|
||||
}
|
||||
|
||||
impl ApiEventMetric for CustomerId {
|
||||
fn get_api_event_type(&self) -> Option<ApiEventsType> {
|
||||
Some(ApiEventsType::Customer {
|
||||
customer_id: self.customer_id.clone(),
|
||||
customer_id: self.get_merchant_reference_id().clone(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user