feat(customer_v2): add customer create v2 endpoint (#5444)

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:
Sahkal Poddar
2024-08-07 13:12:10 +05:30
committed by GitHub
parent c6a960766d
commit 52cada015e
47 changed files with 1474 additions and 160 deletions

View File

@ -1,10 +1,15 @@
use api_models::{enums as api_enums, locker_migration::MigrateCardResponse};
use common_utils::{errors::CustomResult, id_type};
use diesel_models::{enums as storage_enums, PaymentMethod};
use error_stack::{FutureExt, ResultExt};
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
use error_stack::FutureExt;
use error_stack::ResultExt;
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
use futures::TryFutureExt;
use super::{errors::StorageErrorExt, payment_methods::cards};
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
use super::errors::StorageErrorExt;
use super::payment_methods::cards;
use crate::{
errors,
routes::SessionState,
@ -12,6 +17,15 @@ use crate::{
types::{api, domain},
};
#[cfg(all(feature = "v2", feature = "customer_v2"))]
pub async fn rust_locker_migration(
_state: SessionState,
_merchant_id: &id_type::MerchantId,
) -> CustomResult<services::ApplicationResponse<MigrateCardResponse>, errors::ApiErrorResponse> {
todo!()
}
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
pub async fn rust_locker_migration(
state: SessionState,
merchant_id: &id_type::MerchantId,