mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
feat: add routing support for v2 sdk session flow (#6763)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -205,13 +205,14 @@ pub struct MerchantAccountCreateWithoutOrgId {
|
||||
// The following struct is only used internally, so we can reuse the common
|
||||
// part of `create_merchant_account` without duplicating its code for v2
|
||||
#[cfg(feature = "v2")]
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
#[derive(Clone, Debug, Serialize, ToSchema)]
|
||||
pub struct MerchantAccountCreate {
|
||||
pub merchant_name: Secret<common_utils::new_type::MerchantName>,
|
||||
pub merchant_details: Option<MerchantDetails>,
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
pub organization_id: id_type::OrganizationId,
|
||||
/// Product Type of this merchant account
|
||||
#[schema(value_type = Option<MerchantProductType>)]
|
||||
pub product_type: Option<api_enums::MerchantProductType>,
|
||||
}
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ impl EuclidAnalysable for ConnectorSelection {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema, PartialEq)]
|
||||
pub struct ConnectorVolumeSplit {
|
||||
pub connector: RoutableConnectorChoice,
|
||||
pub split: u8,
|
||||
@ -178,7 +178,7 @@ pub struct RoutableConnectorChoice {
|
||||
pub merchant_connector_id: Option<common_utils::id_type::MerchantConnectorAccountId>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
#[derive(Debug, Clone, serde::Deserialize, serde::Serialize, ToSchema, PartialEq)]
|
||||
pub enum RoutableChoiceKind {
|
||||
OnlyConnector,
|
||||
FullStruct,
|
||||
@ -337,7 +337,7 @@ impl TryFrom<RoutingAlgorithmSerde> for RoutingAlgorithm {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema, PartialEq)]
|
||||
#[serde(
|
||||
tag = "type",
|
||||
content = "data",
|
||||
|
||||
Reference in New Issue
Block a user