mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
refactor(router): add display_name field to connector feature api (#7121)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -6471,14 +6471,14 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"three_ds",
|
||||
"non_three_ds",
|
||||
"no_three_ds",
|
||||
"supported_card_networks"
|
||||
],
|
||||
"properties": {
|
||||
"three_ds": {
|
||||
"$ref": "#/components/schemas/FeatureStatus"
|
||||
},
|
||||
"non_three_ds": {
|
||||
"no_three_ds": {
|
||||
"$ref": "#/components/schemas/FeatureStatus"
|
||||
},
|
||||
"supported_card_networks": {
|
||||
@ -6776,6 +6776,10 @@
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"display_name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
|
||||
@ -9228,14 +9228,14 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"three_ds",
|
||||
"non_three_ds",
|
||||
"no_three_ds",
|
||||
"supported_card_networks"
|
||||
],
|
||||
"properties": {
|
||||
"three_ds": {
|
||||
"$ref": "#/components/schemas/FeatureStatus"
|
||||
},
|
||||
"non_three_ds": {
|
||||
"no_three_ds": {
|
||||
"$ref": "#/components/schemas/FeatureStatus"
|
||||
},
|
||||
"supported_card_networks": {
|
||||
@ -9526,6 +9526,10 @@
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"display_name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
|
||||
@ -19,7 +19,7 @@ pub struct CardSpecificFeatures {
|
||||
/// Indicates whether three_ds card payments are supported.
|
||||
pub three_ds: FeatureStatus,
|
||||
/// Indicates whether non three_ds card payments are supported.
|
||||
pub non_three_ds: FeatureStatus,
|
||||
pub no_three_ds: FeatureStatus,
|
||||
/// List of supported card networks
|
||||
pub supported_card_networks: Vec<CardNetwork>,
|
||||
}
|
||||
@ -47,6 +47,7 @@ pub struct SupportedPaymentMethod {
|
||||
#[derive(Debug, ToSchema, Serialize)]
|
||||
pub struct ConnectorFeatureMatrixResponse {
|
||||
pub name: String,
|
||||
pub display_name: Option<String>,
|
||||
pub description: Option<String>,
|
||||
pub category: Option<PaymentConnectorCategory>,
|
||||
pub supported_payment_methods: Vec<SupportedPaymentMethod>,
|
||||
|
||||
@ -847,7 +847,7 @@ lazy_static! {
|
||||
api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({
|
||||
api_models::feature_matrix::CardSpecificFeatures {
|
||||
three_ds: common_enums::FeatureStatus::Supported,
|
||||
non_three_ds: common_enums::FeatureStatus::Supported,
|
||||
no_three_ds: common_enums::FeatureStatus::Supported,
|
||||
supported_card_networks: supported_card_network.clone(),
|
||||
}
|
||||
}),
|
||||
@ -858,8 +858,8 @@ lazy_static! {
|
||||
bambora_supported_payment_methods
|
||||
};
|
||||
static ref BAMBORA_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
|
||||
description: "Bambora is a leading online payment provider in Canada and United States."
|
||||
.to_string(),
|
||||
display_name: "Bambora",
|
||||
description: "Bambora is a leading online payment provider in Canada and United States.",
|
||||
connector_type: enums::PaymentConnectorCategory::PaymentGateway,
|
||||
};
|
||||
static ref BAMBORA_SUPPORTED_WEBHOOK_FLOWS: Vec<enums::EventClass> = Vec::new();
|
||||
|
||||
@ -1031,7 +1031,7 @@ lazy_static! {
|
||||
api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({
|
||||
api_models::feature_matrix::CardSpecificFeatures {
|
||||
three_ds: common_enums::FeatureStatus::Supported,
|
||||
non_three_ds: common_enums::FeatureStatus::NotSupported,
|
||||
no_three_ds: common_enums::FeatureStatus::NotSupported,
|
||||
supported_card_networks: supported_card_network.clone(),
|
||||
}
|
||||
}),
|
||||
@ -1050,7 +1050,7 @@ lazy_static! {
|
||||
api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({
|
||||
api_models::feature_matrix::CardSpecificFeatures {
|
||||
three_ds: common_enums::FeatureStatus::Supported,
|
||||
non_three_ds: common_enums::FeatureStatus::NotSupported,
|
||||
no_three_ds: common_enums::FeatureStatus::NotSupported,
|
||||
supported_card_networks: supported_card_network.clone(),
|
||||
}
|
||||
}),
|
||||
@ -1062,9 +1062,9 @@ lazy_static! {
|
||||
};
|
||||
|
||||
static ref DEUTSCHEBANK_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
|
||||
display_name: "Deutsche Bank",
|
||||
description:
|
||||
"Deutsche Bank is a German multinational investment bank and financial services company "
|
||||
.to_string(),
|
||||
"Deutsche Bank is a German multinational investment bank and financial services company ",
|
||||
connector_type: enums::PaymentConnectorCategory::BankAcquirer,
|
||||
};
|
||||
|
||||
|
||||
@ -466,9 +466,9 @@ lazy_static! {
|
||||
};
|
||||
|
||||
static ref ZSL_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
|
||||
display_name: "ZSL",
|
||||
description:
|
||||
"Zsl is a payment gateway operating in China, specializing in facilitating local bank transfers"
|
||||
.to_string(),
|
||||
"Zsl is a payment gateway operating in China, specializing in facilitating local bank transfers",
|
||||
connector_type: enums::PaymentConnectorCategory::PaymentGateway,
|
||||
};
|
||||
|
||||
|
||||
@ -569,9 +569,10 @@ pub type SupportedPaymentMethods = HashMap<common_enums::PaymentMethod, PaymentM
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ConnectorInfo {
|
||||
/// Display name of the Connector
|
||||
pub display_name: &'static str,
|
||||
/// Description of the connector.
|
||||
pub description: String,
|
||||
|
||||
pub description: &'static str,
|
||||
/// Connector Type
|
||||
pub connector_type: common_enums::PaymentConnectorCategory,
|
||||
}
|
||||
|
||||
@ -99,7 +99,8 @@ fn build_connector_feature_details(
|
||||
.map(|webhook_flows| webhook_flows.to_vec());
|
||||
feature_matrix::ConnectorFeatureMatrixResponse {
|
||||
name: connector_name.to_uppercase(),
|
||||
description: connector_about.map(|about| about.description.clone()),
|
||||
display_name: connector_about.map(|about| about.display_name.to_string()),
|
||||
description: connector_about.map(|about| about.description.to_string()),
|
||||
category: connector_about.map(|about| about.connector_type),
|
||||
supported_webhook_flows,
|
||||
supported_payment_methods,
|
||||
|
||||
Reference in New Issue
Block a user