mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
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:
@ -352,6 +352,7 @@ impl CustomerId {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
|
||||
#[derive(Debug, Deserialize, Serialize, ToSchema)]
|
||||
pub struct CustomerDeleteResponse {
|
||||
/// The identifier for the customer object
|
||||
@ -368,6 +369,26 @@ pub struct CustomerDeleteResponse {
|
||||
pub payment_methods_deleted: bool,
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "v2", feature = "customer_v2"))]
|
||||
#[derive(Debug, Deserialize, Serialize, ToSchema)]
|
||||
pub struct CustomerDeleteResponse {
|
||||
/// The identifier for the customer object
|
||||
#[schema(value_type = String, max_length = 255, example = "cus_y3oqhf46pyzuxjbcn2giaqnb44")]
|
||||
pub merchant_reference_id: Option<id_type::CustomerId>,
|
||||
/// Whether customer was deleted or not
|
||||
#[schema(example = false)]
|
||||
pub customer_deleted: bool,
|
||||
/// Whether address was deleted or not
|
||||
#[schema(example = false)]
|
||||
pub address_deleted: bool,
|
||||
/// Whether payment methods deleted or not
|
||||
#[schema(example = false)]
|
||||
pub payment_methods_deleted: bool,
|
||||
/// Global id
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
/// The identifier for the customer object. If not provided the customer ID will be autogenerated.
|
||||
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
|
||||
#[derive(Debug, Default, Clone, Deserialize, Serialize, ToSchema)]
|
||||
pub struct CustomerUpdateRequest {
|
||||
|
||||
Reference in New Issue
Block a user