mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
feat(payment_methods): Add default payment method column in customers table and last used column in payment_methods table (#3790)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -115,6 +115,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
routes::customers::customers_update,
|
||||
routes::customers::customers_delete,
|
||||
routes::customers::customers_mandates_list,
|
||||
routes::customers::default_payment_method_set_api,
|
||||
|
||||
//Routes for payment methods
|
||||
routes::payment_method::create_payment_method_api,
|
||||
@ -188,6 +189,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
api_models::payment_methods::CustomerPaymentMethodsListResponse,
|
||||
api_models::payment_methods::PaymentMethodDeleteResponse,
|
||||
api_models::payment_methods::PaymentMethodUpdate,
|
||||
api_models::payment_methods::CustomerDefaultPaymentMethodResponse,
|
||||
api_models::payment_methods::CardDetailFromLocker,
|
||||
api_models::payment_methods::CardDetail,
|
||||
api_models::payment_methods::RequestPaymentMethodTypes,
|
||||
@ -374,6 +376,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
api_models::payments::BrowserInformation,
|
||||
api_models::payments::PaymentCreatePaymentLinkConfig,
|
||||
api_models::payment_methods::RequiredFieldInfo,
|
||||
api_models::payment_methods::DefaultPaymentMethod,
|
||||
api_models::payment_methods::MaskedBankDetails,
|
||||
api_models::payment_methods::SurchargeDetailsResponse,
|
||||
api_models::payment_methods::SurchargeResponse,
|
||||
|
||||
@ -116,3 +116,23 @@ pub async fn customers_list() {}
|
||||
security(("api_key" = []))
|
||||
)]
|
||||
pub async fn customers_mandates_list() {}
|
||||
|
||||
/// Customers - Set Default Payment Method
|
||||
///
|
||||
/// Set the Payment Method as Default for the Customer.
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/{customer_id}/payment_methods/{payment_method_id}/default",
|
||||
params (
|
||||
("method_id" = String, Path, description = "Set the Payment Method as Default for the Customer"),
|
||||
),
|
||||
responses(
|
||||
(status = 200, description = "Payment Method has been set as default", body =CustomerDefaultPaymentMethodResponse ),
|
||||
(status = 400, description = "Payment Method has already been set as default for that customer"),
|
||||
(status = 404, description = "Payment Method not found for the customer")
|
||||
),
|
||||
tag = "Customer Set Default Payment Method",
|
||||
operation_id = "Set the Payment Method as Default",
|
||||
security(("ephemeral_key" = []))
|
||||
)]
|
||||
pub async fn default_payment_method_set_api() {}
|
||||
|
||||
Reference in New Issue
Block a user