feat(payouts): extend routing capabilities to payout operation (#3531)

Co-authored-by: Kashif <mohammed.kashif@juspay.in>
This commit is contained in:
Kashif
2024-02-26 13:00:10 +05:30
committed by GitHub
parent c79226b9b2
commit 75c633fc7c
39 changed files with 1341 additions and 556 deletions

View File

@ -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,