mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
refactor(router): refactor merchant_connector_account retrieve and delete v2 apis (#5528)
This commit is contained in:
committed by
GitHub
parent
7e545e36eb
commit
253f1be3e1
@ -663,12 +663,21 @@ pub struct MerchantId {
|
||||
pub merchant_id: id_type::MerchantId,
|
||||
}
|
||||
|
||||
#[cfg(all(
|
||||
any(feature = "v1", feature = "v2"),
|
||||
not(feature = "merchant_connector_account_v2")
|
||||
))]
|
||||
#[derive(Default, Debug, Deserialize, ToSchema, Serialize)]
|
||||
pub struct MerchantConnectorId {
|
||||
#[schema(value_type = String)]
|
||||
pub merchant_id: id_type::MerchantId,
|
||||
pub merchant_connector_id: String,
|
||||
}
|
||||
#[cfg(all(feature = "v2", feature = "merchant_connector_account_v2"))]
|
||||
#[derive(Default, Debug, Deserialize, ToSchema, Serialize)]
|
||||
pub struct MerchantConnectorId {
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "v2", feature = "merchant_connector_account_v2"))]
|
||||
/// 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."
|
||||
@ -1728,6 +1737,10 @@ pub enum AcceptedCountries {
|
||||
AllAccepted,
|
||||
}
|
||||
|
||||
#[cfg(all(
|
||||
any(feature = "v1", feature = "v2"),
|
||||
not(feature = "merchant_connector_account_v2")
|
||||
))]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
|
||||
pub struct MerchantConnectorDeleteResponse {
|
||||
/// The identifier for the Merchant Account
|
||||
@ -1741,6 +1754,20 @@ pub struct MerchantConnectorDeleteResponse {
|
||||
pub deleted: bool,
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "v2", feature = "merchant_connector_account_v2"))]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
|
||||
pub struct MerchantConnectorDeleteResponse {
|
||||
/// The identifier for the Merchant Account
|
||||
#[schema(max_length = 255, example = "y3oqhf46pyzuxjbcn2giaqnb44", value_type = String)]
|
||||
pub merchant_id: id_type::MerchantId,
|
||||
/// Unique ID of the connector
|
||||
#[schema(example = "mca_5apGeP94tMts6rg3U3kR")]
|
||||
pub id: String,
|
||||
/// If the connector is deleted or not
|
||||
#[schema(example = false)]
|
||||
pub deleted: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
|
||||
pub struct ToggleKVResponse {
|
||||
/// The identifier for the Merchant Account
|
||||
|
||||
Reference in New Issue
Block a user