mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
refactor(router): add openapi spec support for merchant_connector apis (#2997)
This commit is contained in:
committed by
GitHub
parent
b3c51e6eb5
commit
cdbb3853cd
@ -73,11 +73,11 @@ Never share your secret api keys. Keep them guarded and secure.
|
|||||||
// crate::routes::admin::retrieve_merchant_account,
|
// crate::routes::admin::retrieve_merchant_account,
|
||||||
// crate::routes::admin::update_merchant_account,
|
// crate::routes::admin::update_merchant_account,
|
||||||
// crate::routes::admin::delete_merchant_account,
|
// crate::routes::admin::delete_merchant_account,
|
||||||
// crate::routes::admin::payment_connector_create,
|
crate::routes::admin::payment_connector_create,
|
||||||
// crate::routes::admin::payment_connector_retrieve,
|
crate::routes::admin::payment_connector_retrieve,
|
||||||
// crate::routes::admin::payment_connector_list,
|
crate::routes::admin::payment_connector_list,
|
||||||
// crate::routes::admin::payment_connector_update,
|
crate::routes::admin::payment_connector_update,
|
||||||
// crate::routes::admin::payment_connector_delete,
|
crate::routes::admin::payment_connector_delete,
|
||||||
crate::routes::mandates::get_mandate,
|
crate::routes::mandates::get_mandate,
|
||||||
crate::routes::mandates::revoke_mandate,
|
crate::routes::mandates::revoke_mandate,
|
||||||
crate::routes::payments::payments_create,
|
crate::routes::payments::payments_create,
|
||||||
|
|||||||
@ -190,7 +190,7 @@ pub async fn delete_merchant_account(
|
|||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
/// PaymentsConnectors - Create
|
/// Merchant Connector - Create
|
||||||
///
|
///
|
||||||
/// Create a new Merchant Connector for the merchant account. The connector could be a payment processor / facilitator / acquirer or specialized services like Fraud / Accounting etc."
|
/// Create a new Merchant Connector for the merchant account. The connector could be a payment processor / facilitator / acquirer or specialized services like Fraud / Accounting etc."
|
||||||
#[utoipa::path(
|
#[utoipa::path(
|
||||||
|
|||||||
@ -129,6 +129,259 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/accounts/{account_id}/connectors": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Merchant Connector Account"
|
||||||
|
],
|
||||||
|
"summary": "Merchant Connector - List",
|
||||||
|
"description": "Merchant Connector - List\n\nList Merchant Connector Details for the merchant",
|
||||||
|
"operationId": "List all Merchant Connectors",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "account_id",
|
||||||
|
"in": "path",
|
||||||
|
"description": "The unique identifier for the merchant account",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Merchant Connector list retrieved successfully",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/MerchantConnectorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized request"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Merchant Connector does not exist in records"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_api_key": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Merchant Connector Account"
|
||||||
|
],
|
||||||
|
"summary": "Merchant Connector - Create",
|
||||||
|
"description": "Merchant Connector - Create\n\nCreate a new Merchant Connector for the merchant account. The connector could be a payment processor / facilitator / acquirer or specialized services like Fraud / Accounting etc.\"",
|
||||||
|
"operationId": "Create a Merchant Connector",
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/MerchantConnectorCreate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Merchant Connector Created",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/MerchantConnectorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Missing Mandatory fields"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_api_key": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/accounts/{account_id}/connectors/{connector_id}": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Merchant Connector Account"
|
||||||
|
],
|
||||||
|
"summary": "Merchant Connector - Retrieve",
|
||||||
|
"description": "Merchant Connector - Retrieve\n\nRetrieve Merchant Connector Details",
|
||||||
|
"operationId": "Retrieve a Merchant Connector",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "account_id",
|
||||||
|
"in": "path",
|
||||||
|
"description": "The unique identifier for the merchant account",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "connector_id",
|
||||||
|
"in": "path",
|
||||||
|
"description": "The unique identifier for the Merchant Connector",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Merchant Connector retrieved successfully",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/MerchantConnectorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized request"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Merchant Connector does not exist in records"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_api_key": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Merchant Connector Account"
|
||||||
|
],
|
||||||
|
"summary": "Merchant Connector - Update",
|
||||||
|
"description": "Merchant Connector - Update\n\nTo update an existing Merchant Connector. Helpful in enabling / disabling different payment methods and other settings for the connector etc.",
|
||||||
|
"operationId": "Update a Merchant Connector",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "account_id",
|
||||||
|
"in": "path",
|
||||||
|
"description": "The unique identifier for the merchant account",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "connector_id",
|
||||||
|
"in": "path",
|
||||||
|
"description": "The unique identifier for the Merchant Connector",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/MerchantConnectorUpdate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Merchant Connector Updated",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/MerchantConnectorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized request"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Merchant Connector does not exist in records"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_api_key": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"tags": [
|
||||||
|
"Merchant Connector Account"
|
||||||
|
],
|
||||||
|
"summary": "Merchant Connector - Delete",
|
||||||
|
"description": "Merchant Connector - Delete\n\nDelete or Detach a Merchant Connector from Merchant Account",
|
||||||
|
"operationId": "Delete a Merchant Connector",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "account_id",
|
||||||
|
"in": "path",
|
||||||
|
"description": "The unique identifier for the merchant account",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "connector_id",
|
||||||
|
"in": "path",
|
||||||
|
"description": "The unique identifier for the Merchant Connector",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Merchant Connector Deleted",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/MerchantConnectorDeleteResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized request"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Merchant Connector does not exist in records"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_api_key": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/customers": {
|
"/customers": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
|
|||||||
Reference in New Issue
Block a user