mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(core): Add support for card network tokenization (#5599)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1917,6 +1917,11 @@ pub struct BusinessProfileCreate {
|
||||
/// If set to `true` tax_connector_id will be checked.
|
||||
#[serde(default)]
|
||||
pub is_tax_connector_enabled: bool,
|
||||
|
||||
/// Indicates if is_network_tokenization_enabled is enabled or not.
|
||||
/// If set to `true` is_network_tokenization_enabled will be checked.
|
||||
#[serde(default)]
|
||||
pub is_network_tokenization_enabled: bool,
|
||||
}
|
||||
|
||||
#[nutype::nutype(
|
||||
@ -2021,6 +2026,11 @@ pub struct BusinessProfileCreate {
|
||||
/// If set to `true` tax_connector_id will be checked.
|
||||
#[serde(default)]
|
||||
pub is_tax_connector_enabled: bool,
|
||||
|
||||
/// Indicates if is_network_tokenization_enabled is enabled or not.
|
||||
/// If set to `true` is_network_tokenization_enabled will be checked.
|
||||
#[serde(default)]
|
||||
pub is_network_tokenization_enabled: bool,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
@ -2138,6 +2148,11 @@ pub struct BusinessProfileResponse {
|
||||
/// Indicates if tax_calculator connector is enabled or not.
|
||||
/// If set to `true` tax_connector_id will be checked.
|
||||
pub is_tax_connector_enabled: bool,
|
||||
|
||||
/// Indicates if is_network_tokenization_enabled is enabled or not.
|
||||
/// If set to `true` is_network_tokenization_enabled will be checked.
|
||||
#[schema(default = false, example = false)]
|
||||
pub is_network_tokenization_enabled: bool,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
@ -2246,6 +2261,11 @@ pub struct BusinessProfileResponse {
|
||||
/// Indicates if tax_calculator connector is enabled or not.
|
||||
/// If set to `true` tax_connector_id will be checked.
|
||||
pub is_tax_connector_enabled: bool,
|
||||
|
||||
/// Indicates if is_network_tokenization_enabled is enabled or not.
|
||||
/// If set to `true` is_network_tokenization_enabled will be checked.
|
||||
#[schema(default = false, example = false)]
|
||||
pub is_network_tokenization_enabled: bool,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
@ -2359,6 +2379,9 @@ pub struct BusinessProfileUpdate {
|
||||
/// Indicates if dynamic routing is enabled or not.
|
||||
#[serde(default)]
|
||||
pub dynamic_routing_algorithm: Option<serde_json::Value>,
|
||||
|
||||
/// Indicates if is_network_tokenization_enabled is enabled or not.
|
||||
pub is_network_tokenization_enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
@ -2459,6 +2482,9 @@ pub struct BusinessProfileUpdate {
|
||||
/// Indicates if tax_calculator connector is enabled or not.
|
||||
/// If set to `true` tax_connector_id will be checked.
|
||||
pub is_tax_connector_enabled: Option<bool>,
|
||||
|
||||
/// Indicates if is_network_tokenization_enabled is enabled or not.
|
||||
pub is_network_tokenization_enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
|
||||
@ -1026,7 +1026,15 @@ pub struct MandateIds {
|
||||
#[derive(Eq, PartialEq, Debug, serde::Deserialize, serde::Serialize, Clone)]
|
||||
pub enum MandateReferenceId {
|
||||
ConnectorMandateId(ConnectorMandateReferenceId), // mandate_id send by connector
|
||||
NetworkMandateId(String), // network_txns_id send by Issuer to connector, Used for PG agnostic mandate txns
|
||||
NetworkMandateId(String), // network_txns_id send by Issuer to connector, Used for PG agnostic mandate txns along with card data
|
||||
NetworkTokenWithNTI(NetworkTokenWithNTIRef), // network_txns_id send by Issuer to connector, Used for PG agnostic mandate txns along with network token data
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, Eq, PartialEq)]
|
||||
pub struct NetworkTokenWithNTIRef {
|
||||
pub network_transaction_id: String,
|
||||
pub token_exp_month: Option<Secret<String>>,
|
||||
pub token_exp_year: Option<Secret<String>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, Eq, PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user