Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(router): fix merchant_connector_account retrieve and delete v2 routes (#5653)
Sai Harsha Vardhan723411905a81
diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.jsonindex 4adea87aa5..84711c7b35 100644--- a/api-reference-v2/openapi_spec.json+++ b/api-reference-v2/openapi_spec.json@@ -169,6 +169,8 @@"tags": ["Merchant Connector Account"],+ "summary": "Merchant Connector - Create",+ "description": "Merchant Connector - Create\n\nCreates a new Merchant Connector for the merchant account. The connector could be a payment processor/facilitator/acquirer or a provider of specialized services like Fraud/Accounting etc.","operationId": "Create a Merchant Connector","requestBody": {"content": {@@ -244,6 +246,8 @@"tags": ["Merchant Connector Account"],+ "summary": "Merchant Connector - Retrieve",+ "description": "Merchant Connector - Retrieve\n\nRetrieves details of a Connector account","operationId": "Retrieve a Merchant Connector","parameters": [{@@ -285,6 +289,8 @@"tags": ["Merchant Connector Account"],+ "summary": "Merchant Connector - Update",+ "description": "Merchant Connector - Update\n\nTo update an existing Merchant Connector account. Helpful in enabling/disabling different payment methods and other settings for the connector","operationId": "Update a Merchant Connector","parameters": [{@@ -355,6 +361,8 @@"tags": ["Merchant Connector Account"],+ "summary": "Merchant Connector - Delete",+ "description": "Merchant Connector - Delete\n\nDelete or Detach a Merchant Connector from Merchant Account","operationId": "Delete a Merchant Connector","parameters": [{diff --git a/crates/openapi/src/routes/merchant_connector_account.rs b/crates/openapi/src/routes/merchant_connector_account.rsindex d4bb0c1bd4..763c9f5f12 100644--- a/crates/openapi/src/routes/merchant_connector_account.rs+++ b/crates/openapi/src/routes/merchant_connector_account.rs@@ -61,6 +61,9 @@)]pub async fn connector_create() {}+/// Merchant Connector - Create+///+/// Creates a new Merchant Connector for the merchant account. The connector could be a payment processor/facilitator/acquirer or a provider of specialized services like Fraud/Accounting etc.#[cfg(feature = "v2")]#[utoipa::path(post,@@ -143,6 +146,9 @@ pub async fn connector_create() {})]pub async fn connector_retrieve() {}+/// Merchant Connector - Retrieve+///+/// Retrieves details of a Connector account#[cfg(feature = "v2")]#[utoipa::path(get,@@ -229,6 +235,9 @@ pub async fn payment_connector_list() {})]pub async fn connector_update() {}+/// Merchant Connector - Update+///+/// To update an existing Merchant Connector account. Helpful in enabling/disabling different payment methods and other settings for the connector#[cfg(feature = "v2")]#[utoipa::path(post,@@ -295,6 +304,9 @@ pub async fn connector_update() {})]pub async fn connector_delete() {}+/// Merchant Connector - Delete+///+/// Delete or Detach a Merchant Connector from Merchant Account#[cfg(feature = "v2")]#[utoipa::path(delete,diff --git a/crates/router/src/routes/app.rs b/crates/router/src/routes/app.rsindex 955d091202..e3a4fb8a54 100644--- a/crates/router/src/routes/app.rs+++ b/crates/router/src/routes/app.rs@@ -1183,9 +1183,12 @@ impl MerchantConnectorAccount {route = route.service(web::resource("").route(web::post().to(connector_create)))- .service(web::resource("/{id}").route(web::post().to(connector_update)))- .service(web::resource("/{id}").route(web::get().to(connector_retrieve)))- .service(web::resource("/{id}").route(web::delete().to(connector_delete)));+ .service(+ web::resource("/{id}")+ .route(web::post().to(connector_update))+ .route(web::get().to(connector_retrieve))+ .route(web::delete().to(connector_delete)),+ );}route}