feat(core): routes to toggle blocklist (#3568)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Shanks <shashank.attarde@juspay.in>
This commit is contained in:
Prajjwal Kumar
2024-02-07 17:22:48 +05:30
committed by GitHub
parent a15e7ae9b1
commit fbe84b2a33
10 changed files with 186 additions and 0 deletions

View File

@ -151,6 +151,7 @@ Never share your secret api keys. Keep them guarded and secure.
routes::blocklist::remove_entry_from_blocklist,
routes::blocklist::list_blocked_payment_methods,
routes::blocklist::add_entry_to_blocklist,
routes::blocklist::toggle_blocklist_guard,
// Routes for payouts
routes::payouts::payouts_create,
@ -450,6 +451,7 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::payments::PaymentLinkStatus,
api_models::blocklist::BlocklistRequest,
api_models::blocklist::BlocklistResponse,
api_models::blocklist::ToggleBlocklistResponse,
api_models::blocklist::ListBlocklistQuery,
api_models::enums::BlocklistDataKind
)),

View File

@ -1,3 +1,19 @@
#[utoipa::path(
post,
path = "/blocklist/toggle",
params (
("status" = bool, Query, description = "Boolean value to enable/disable blocklist"),
),
responses(
(status = 200, description = "Blocklist guard enabled/disabled", body = ToggleBlocklistResponse),
(status = 400, description = "Invalid Data")
),
tag = "Blocklist",
operation_id = "Toggle blocklist guard for a particular merchant",
security(("api_key" = []))
)]
pub async fn toggle_blocklist_guard() {}
#[utoipa::path(
post,
path = "/blocklist",