mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
feat(payouts): extend routing capabilities to payout operation (#3531)
Co-authored-by: Kashif <mohammed.kashif@juspay.in>
This commit is contained in:
@ -181,6 +181,28 @@ impl From<PayoutConnectors> for RoutableConnectors {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "payouts")]
|
||||
impl From<PayoutConnectors> for Connector {
|
||||
fn from(value: PayoutConnectors) -> Self {
|
||||
match value {
|
||||
PayoutConnectors::Adyen => Self::Adyen,
|
||||
PayoutConnectors::Wise => Self::Wise,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "payouts")]
|
||||
impl TryFrom<Connector> for PayoutConnectors {
|
||||
type Error = String;
|
||||
fn try_from(value: Connector) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
Connector::Adyen => Ok(Self::Adyen),
|
||||
Connector::Wise => Ok(Self::Wise),
|
||||
_ => Err(format!("Invalid payout connector {}", value)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "frm")]
|
||||
#[derive(
|
||||
Clone,
|
||||
|
||||
Reference in New Issue
Block a user