mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(routing): build gRPC Client Interface to initiate communication with other gRPC services (#5835)
Co-authored-by: prajjwalkumar17 <prajjwal.kumar@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Nishant Joshi <nishant.joshi@juspay.in>
This commit is contained in:
@ -197,7 +197,9 @@ pub enum RoutableChoiceSerde {
|
||||
impl std::fmt::Display for RoutableConnectorChoice {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let base = self.connector.to_string();
|
||||
|
||||
if let Some(mca_id) = &self.merchant_connector_id {
|
||||
return write!(f, "{}:{}", base, mca_id.get_string_repr());
|
||||
}
|
||||
write!(f, "{}", base)
|
||||
}
|
||||
}
|
||||
@ -252,6 +254,11 @@ impl From<RoutableConnectorChoice> for RoutableChoiceSerde {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
|
||||
pub struct RoutableConnectorChoiceWithStatus {
|
||||
pub routable_connector_choice: RoutableConnectorChoice,
|
||||
pub status: bool,
|
||||
}
|
||||
#[derive(Debug, Copy, Clone, serde::Serialize, serde::Deserialize, strum::Display, ToSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
@ -565,7 +572,7 @@ impl Default for SuccessBasedRoutingConfig {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, ToSchema)]
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, ToSchema, strum::Display)]
|
||||
pub enum SuccessBasedRoutingConfigParams {
|
||||
PaymentMethod,
|
||||
PaymentMethodType,
|
||||
|
||||
Reference in New Issue
Block a user