feat(router): Add customer_list_saved_payment_methods endpoint to OLAP (#7241)

This commit is contained in:
Anurag Thakur
2025-02-24 12:34:23 +05:30
committed by GitHub
parent 9f334c1ebc
commit fdfcdcc7a1
6 changed files with 121 additions and 5 deletions

View File

@ -136,6 +136,7 @@ Never share your secret api keys. Keep them guarded and secure.
routes::payment_method::payment_method_update_api,
routes::payment_method::payment_method_retrieve_api,
routes::payment_method::payment_method_delete_api,
routes::payment_method::list_customer_payment_method_api,
//Routes for payment method session
routes::payment_method::payment_method_session_create,

View File

@ -322,6 +322,26 @@ pub async fn payment_method_update_api() {}
#[cfg(feature = "v2")]
pub async fn payment_method_delete_api() {}
/// Payment Method - List Customer Saved Payment Methods
///
/// List the payment methods saved for a customer
#[utoipa::path(
delete,
path = "/v2/customers/{id}/saved-payment-methods",
params (
("id" = String, Path, description = "The unique identifier for the customer"),
),
responses(
(status = 200, description = "Payment Methods Retrieved", body = CustomerPaymentMethodsListResponse),
(status = 404, description = "Customer Not Found"),
),
tag = "Payment Methods",
operation_id = "List Customer Saved Payment Methods",
security(("api_key" = []))
)]
#[cfg(feature = "v2")]
pub async fn list_customer_payment_method_api() {}
/// Payment Method Session - Create
///
/// Create a payment method session for a customer