mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
feat(router): add admin list apis for v2 (#5883)
This commit is contained in:
committed by
GitHub
parent
fbd2cda763
commit
bc6c460ca9
@ -104,7 +104,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
// Routes for merchant connector account
|
||||
routes::merchant_connector_account::connector_create,
|
||||
routes::merchant_connector_account::connector_retrieve,
|
||||
routes::merchant_connector_account::payment_connector_list,
|
||||
routes::merchant_connector_account::connector_list,
|
||||
routes::merchant_connector_account::connector_update,
|
||||
routes::merchant_connector_account::connector_delete,
|
||||
|
||||
|
||||
@ -73,6 +73,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
routes::organization::organization_create,
|
||||
routes::organization::organization_retrieve,
|
||||
routes::organization::organization_update,
|
||||
routes::organization::merchant_account_list,
|
||||
|
||||
// Routes for merchant connector account
|
||||
routes::merchant_connector_account::connector_create,
|
||||
@ -84,11 +85,13 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
routes::merchant_account::merchant_account_create,
|
||||
routes::merchant_account::merchant_account_retrieve,
|
||||
routes::merchant_account::merchant_account_update,
|
||||
routes::merchant_account::business_profiles_list,
|
||||
|
||||
// Routes for business profile
|
||||
routes::business_profile::business_profile_create,
|
||||
routes::business_profile::business_profile_retrieve,
|
||||
routes::business_profile::business_profile_update,
|
||||
routes::business_profile::connector_list,
|
||||
|
||||
// Routes for routing under business profile
|
||||
routes::business_profile::routing_link_config,
|
||||
|
||||
@ -323,3 +323,24 @@ pub async fn routing_update_default_config() {}
|
||||
security(("api_key" = []), ("jwt_key" = []))
|
||||
)]
|
||||
pub async fn routing_retrieve_default_config() {}
|
||||
|
||||
/// Merchant Connector - List
|
||||
///
|
||||
/// List Merchant Connector Details for the business profile
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v2/profiles/{profile_id}/connector_accounts",
|
||||
params(
|
||||
("profile_id" = String, Path, description = "The unique identifier for the business profile"),
|
||||
),
|
||||
responses(
|
||||
(status = 200, description = "Merchant Connector list retrieved successfully", body = Vec<MerchantConnectorResponse>),
|
||||
(status = 404, description = "Merchant Connector does not exist in records"),
|
||||
(status = 401, description = "Unauthorized request")
|
||||
),
|
||||
tag = "Business Profile",
|
||||
operation_id = "List all Merchant Connectors",
|
||||
security(("admin_api_key" = []))
|
||||
)]
|
||||
#[cfg(feature = "v2")]
|
||||
pub async fn connector_list() {}
|
||||
|
||||
@ -50,7 +50,7 @@ pub async fn merchant_account_create() {}
|
||||
/// Before creating the merchant account, it is mandatory to create an organization.
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/v2/accounts",
|
||||
path = "/v2/merchant_accounts",
|
||||
request_body(
|
||||
content = MerchantAccountCreate,
|
||||
examples(
|
||||
@ -124,7 +124,7 @@ pub async fn retrieve_merchant_account() {}
|
||||
/// Retrieve a *merchant* account details.
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v2/accounts/{id}",
|
||||
path = "/v2/merchant_accounts/{id}",
|
||||
params (("id" = String, Path, description = "The unique identifier for the merchant account")),
|
||||
responses(
|
||||
(status = 200, description = "Merchant Account Retrieved", body = MerchantAccountResponse),
|
||||
@ -186,7 +186,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(
|
||||
put,
|
||||
path = "/v2/accounts/{id}",
|
||||
path = "/v2/merchant_accounts/{id}",
|
||||
request_body (
|
||||
content = MerchantAccountUpdate,
|
||||
examples(
|
||||
@ -269,3 +269,21 @@ pub async fn delete_merchant_account() {}
|
||||
security(("admin_api_key" = []))
|
||||
)]
|
||||
pub async fn merchant_account_kv_status() {}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
/// Business Profile - List
|
||||
///
|
||||
/// List business profiles for an Merchant
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v2/merchant_accounts/{account_id}/profiles",
|
||||
params (("account_id" = String, Path, description = "The unique identifier for the Merchant")),
|
||||
responses(
|
||||
(status = 200, description = "Business profile list retrieved successfully", body = Vec<BusinessProfileResponse>),
|
||||
(status = 400, description = "Invalid data")
|
||||
),
|
||||
tag = "Merchant Account",
|
||||
operation_id = "List Business Profiles",
|
||||
security(("admin_api_key" = []))
|
||||
)]
|
||||
pub async fn business_profiles_list() {}
|
||||
|
||||
@ -185,7 +185,7 @@ pub async fn connector_retrieve() {}
|
||||
operation_id = "List all Merchant Connectors",
|
||||
security(("admin_api_key" = []))
|
||||
)]
|
||||
pub async fn payment_connector_list() {}
|
||||
pub async fn connector_list() {}
|
||||
|
||||
/// Merchant Connector - Update
|
||||
///
|
||||
|
||||
@ -143,3 +143,21 @@ pub async fn organization_retrieve() {}
|
||||
security(("admin_api_key" = []))
|
||||
)]
|
||||
pub async fn organization_update() {}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
/// Merchant Account - List
|
||||
///
|
||||
/// List merchant accounts for an Organization
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v2/organization/{organization_id}/merchant_accounts",
|
||||
params (("organization_id" = String, Path, description = "The unique identifier for the Organization")),
|
||||
responses(
|
||||
(status = 200, description = "Merchant Account list retrieved successfully", body = Vec<MerchantAccountResponse>),
|
||||
(status = 400, description = "Invalid data")
|
||||
),
|
||||
tag = "Organization",
|
||||
operation_id = "List Merchant Accounts",
|
||||
security(("admin_api_key" = []))
|
||||
)]
|
||||
pub async fn merchant_account_list() {}
|
||||
|
||||
Reference in New Issue
Block a user