feat(customer_v2): add route for customer retrieve v2 (#5516)

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-08-22 20:24:56 +05:30
committed by GitHub
parent ca40e06f8f
commit 914cab0d7b
14 changed files with 247 additions and 74 deletions

View File

@ -282,6 +282,8 @@ pub struct CustomerResponse {
/// The identifier for the default payment method.
#[schema(max_length = 64, example = "pm_djh2837dwduh890123")]
pub default_payment_method_id: Option<String>,
/// Global id
pub id: String,
}
#[cfg(all(feature = "v2", feature = "customer_v2"))]
@ -308,6 +310,19 @@ impl CustomerId {
}
}
#[cfg(all(feature = "v2", feature = "customer_v2"))]
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct GlobalId {
pub id: String,
}
#[cfg(all(feature = "v2", feature = "customer_v2"))]
impl GlobalId {
pub fn new(id: String) -> Self {
Self { id }
}
}
#[cfg(all(feature = "v2", feature = "customer_v2"))]
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct CustomerId {