refactor: update v2 resource update endpoints to use PUT method instead of POST (#5657)

This commit is contained in:
Sanchith Hegde
2024-08-22 14:09:39 +05:30
committed by GitHub
parent ca72fedae8
commit 7f10678c36
8 changed files with 12 additions and 12 deletions

View File

@ -1,3 +1,3 @@
---
openapi: post /v2/profiles/{profile_id}
openapi: put /v2/profiles/{profile_id}
---

View File

@ -1,3 +1,3 @@
---
openapi: post /v2/accounts/{id}
openapi: put /v2/accounts/{id}
---

View File

@ -1,3 +1,3 @@
---
openapi: post /v2/connector_accounts/{id}
openapi: put /v2/connector_accounts/{id}
---

View File

@ -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"
],

View File

@ -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")

View File

@ -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,

View File

@ -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,

View File

@ -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")