chore(doc): add API ref for KV toggle (#3784)

This commit is contained in:
Kartikeya Hegde
2024-03-06 07:49:38 +00:00
committed by GitHub
parent bf675878a2
commit 5e8fcda7d1
3 changed files with 134 additions and 0 deletions

View File

@ -90,6 +90,7 @@ Never share your secret api keys. Keep them guarded and secure.
routes::merchant_account::retrieve_merchant_account,
routes::merchant_account::update_merchant_account,
routes::merchant_account::delete_merchant_account,
routes::merchant_account::merchant_account_kv_status,
// Routes for merchant connector account
routes::merchant_connector_account::payment_connector_create,
@ -431,6 +432,8 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::admin::MerchantAccountResponse,
api_models::admin::MerchantConnectorId,
api_models::admin::MerchantDetails,
api_models::admin::ToggleKVRequest,
api_models::admin::ToggleKVResponse,
api_models::admin::WebhookDetails,
api_models::api_keys::ApiKeyExpiration,
api_models::api_keys::CreateApiKeyRequest,

View File

@ -123,3 +123,35 @@ pub async fn update_merchant_account() {}
security(("admin_api_key" = []))
)]
pub async fn delete_merchant_account() {}
/// Merchant Account - KV Status
///
/// Toggle KV mode for the Merchant Account
#[utoipa::path(
post,
path = "/accounts/{account_id}/kv",
request_body (
content = ToggleKVRequest,
examples (
("Enable KV for Merchant" = (
value = json!({
"kv_enabled": "true"
})
)),
("Disable KV for Merchant" = (
value = json!({
"kv_enabled": "false"
})
)))
),
params (("account_id" = String, Path, description = "The unique identifier for the merchant account")),
responses(
(status = 200, description = "KV mode is enabled/disabled for Merchant Account", body = ToggleKVResponse),
(status = 400, description = "Invalid data"),
(status = 404, description = "Merchant account not found")
),
tag = "Merchant Account",
operation_id = "Enable/Disable KV for a Merchant Account",
security(("admin_api_key" = []))
)]
pub async fn merchant_account_kv_status() {}