mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
refactor: update v2 resource update endpoints to use PUT method instead of POST (#5657)
This commit is contained in:
@ -1,3 +1,3 @@
|
||||
---
|
||||
openapi: post /v2/profiles/{profile_id}
|
||||
openapi: put /v2/profiles/{profile_id}
|
||||
---
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
---
|
||||
openapi: post /v2/accounts/{id}
|
||||
openapi: put /v2/accounts/{id}
|
||||
---
|
||||
@ -1,3 +1,3 @@
|
||||
---
|
||||
openapi: post /v2/connector_accounts/{id}
|
||||
openapi: put /v2/connector_accounts/{id}
|
||||
---
|
||||
@ -285,7 +285,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"Merchant Connector Account"
|
||||
],
|
||||
@ -509,7 +509,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"Merchant Account"
|
||||
],
|
||||
@ -662,7 +662,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"Business Profile"
|
||||
],
|
||||
|
||||
@ -119,7 +119,7 @@ pub async fn business_profile_update() {}
|
||||
///
|
||||
/// Update the *business profile*
|
||||
#[utoipa::path(
|
||||
post,
|
||||
put,
|
||||
path = "/v2/profiles/{profile_id}",
|
||||
params(
|
||||
("profile_id" = String, Path, description = "The unique identifier for the business profile")
|
||||
|
||||
@ -185,7 +185,7 @@ pub async fn update_merchant_account() {}
|
||||
///
|
||||
/// Updates details of an existing merchant account. Helpful in updating merchant details such as email, contact details, or other configuration details like webhook, routing algorithm etc
|
||||
#[utoipa::path(
|
||||
post,
|
||||
put,
|
||||
path = "/v2/accounts/{id}",
|
||||
request_body (
|
||||
content = MerchantAccountUpdate,
|
||||
|
||||
@ -240,7 +240,7 @@ pub async fn 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,
|
||||
put,
|
||||
path = "/v2/connector_accounts/{id}",
|
||||
request_body(
|
||||
content = MerchantConnectorUpdate,
|
||||
|
||||
@ -1133,7 +1133,7 @@ impl MerchantAccount {
|
||||
.service(
|
||||
web::resource("/{id}")
|
||||
.route(web::get().to(retrieve_merchant_account))
|
||||
.route(web::post().to(update_merchant_account)),
|
||||
.route(web::put().to(update_merchant_account)),
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -1186,7 +1186,7 @@ impl MerchantConnectorAccount {
|
||||
.service(web::resource("").route(web::post().to(connector_create)))
|
||||
.service(
|
||||
web::resource("/{id}")
|
||||
.route(web::post().to(connector_update))
|
||||
.route(web::put().to(connector_update))
|
||||
.route(web::get().to(connector_retrieve))
|
||||
.route(web::delete().to(connector_delete)),
|
||||
);
|
||||
@ -1476,7 +1476,7 @@ impl BusinessProfile {
|
||||
.service(
|
||||
web::resource("")
|
||||
.route(web::get().to(business_profile_retrieve))
|
||||
.route(web::post().to(business_profile_update)),
|
||||
.route(web::put().to(business_profile_update)),
|
||||
)
|
||||
.service(
|
||||
web::resource("/fallback_routing")
|
||||
|
||||
Reference in New Issue
Block a user