mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
chore(doc): add API ref for KV toggle (#3784)
This commit is contained in:
@ -90,6 +90,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
|||||||
routes::merchant_account::retrieve_merchant_account,
|
routes::merchant_account::retrieve_merchant_account,
|
||||||
routes::merchant_account::update_merchant_account,
|
routes::merchant_account::update_merchant_account,
|
||||||
routes::merchant_account::delete_merchant_account,
|
routes::merchant_account::delete_merchant_account,
|
||||||
|
routes::merchant_account::merchant_account_kv_status,
|
||||||
|
|
||||||
// Routes for merchant connector account
|
// Routes for merchant connector account
|
||||||
routes::merchant_connector_account::payment_connector_create,
|
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::MerchantAccountResponse,
|
||||||
api_models::admin::MerchantConnectorId,
|
api_models::admin::MerchantConnectorId,
|
||||||
api_models::admin::MerchantDetails,
|
api_models::admin::MerchantDetails,
|
||||||
|
api_models::admin::ToggleKVRequest,
|
||||||
|
api_models::admin::ToggleKVResponse,
|
||||||
api_models::admin::WebhookDetails,
|
api_models::admin::WebhookDetails,
|
||||||
api_models::api_keys::ApiKeyExpiration,
|
api_models::api_keys::ApiKeyExpiration,
|
||||||
api_models::api_keys::CreateApiKeyRequest,
|
api_models::api_keys::CreateApiKeyRequest,
|
||||||
|
|||||||
@ -123,3 +123,35 @@ pub async fn update_merchant_account() {}
|
|||||||
security(("admin_api_key" = []))
|
security(("admin_api_key" = []))
|
||||||
)]
|
)]
|
||||||
pub async fn delete_merchant_account() {}
|
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() {}
|
||||||
|
|||||||
@ -913,6 +913,72 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/accounts/{account_id}/kv": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Merchant Account"
|
||||||
|
],
|
||||||
|
"summary": "Merchant Account - KV Status",
|
||||||
|
"description": "Merchant Account - KV Status\n\nToggle KV mode for the Merchant Account",
|
||||||
|
"operationId": "Enable/Disable KV for a Merchant Account",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "account_id",
|
||||||
|
"in": "path",
|
||||||
|
"description": "The unique identifier for the merchant account",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ToggleKVRequest"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"Disable KV for Merchant": {
|
||||||
|
"value": {
|
||||||
|
"kv_enabled": "false"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Enable KV for Merchant": {
|
||||||
|
"value": {
|
||||||
|
"kv_enabled": "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "KV mode is enabled/disabled for Merchant Account",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ToggleKVResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid data"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Merchant account not found"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_api_key": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api_keys/{merchant_id)": {
|
"/api_keys/{merchant_id)": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -16736,6 +16802,39 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ToggleKVRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"kv_enabled"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"kv_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Status of KV for the specific merchant",
|
||||||
|
"example": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ToggleKVResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"merchant_id",
|
||||||
|
"kv_enabled"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"merchant_id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The identifier for the Merchant Account",
|
||||||
|
"example": "y3oqhf46pyzuxjbcn2giaqnb44",
|
||||||
|
"maxLength": 255
|
||||||
|
},
|
||||||
|
"kv_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Status of KV for the specific merchant",
|
||||||
|
"example": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"TouchNGoRedirection": {
|
"TouchNGoRedirection": {
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user