feat(router): add retrieve poll status api (#4358)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sai Harsha Vardhan
2024-04-17 15:50:53 +05:30
committed by GitHub
parent 5a0a8cee76
commit ca47ea9b13
21 changed files with 254 additions and 6 deletions

View File

@ -178,6 +178,9 @@ Never share your secret api keys. Keep them guarded and secure.
routes::webhook_events::list_initial_webhook_delivery_attempts,
routes::webhook_events::list_webhook_delivery_attempts,
routes::webhook_events::retry_webhook_delivery_attempt,
// Routes for poll apis
routes::poll::retrieve_poll_status,
),
components(schemas(
api_models::refunds::RefundRequest,
@ -206,6 +209,8 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::payment_methods::CardDetail,
api_models::payment_methods::CardDetailUpdate,
api_models::payment_methods::RequestPaymentMethodTypes,
api_models::poll::PollResponse,
api_models::poll::PollStatus,
api_models::customers::CustomerResponse,
api_models::admin::AcceptedCountries,
api_models::admin::AcceptedCurrencies,

View File

@ -13,11 +13,12 @@ pub mod payment_link;
pub mod payment_method;
pub mod payments;
pub mod payouts;
pub mod poll;
pub mod refunds;
pub mod routing;
pub mod webhook_events;
pub use self::{
customers::*, mandates::*, merchant_account::*, merchant_connector_account::*,
payment_method::*, payments::*, refunds::*, routing::*, webhook_events::*,
payment_method::*, payments::*, poll::*, refunds::*, routing::*, webhook_events::*,
};

View File

@ -0,0 +1,15 @@
/// Poll - Retrieve Poll Status
#[utoipa::path(
get,
path = "/poll/status/{poll_id}",
params(
("poll_id" = String, Path, description = "The identifier for poll")
),
responses(
(status = 200, description = "The poll status was retrieved successfully", body = PollResponse)
),
tag = "Poll",
operation_id = "Retrieve Poll Status",
security(("publishable_key" = []))
)]
pub async fn retrieve_poll_status() {}