fix(connector): [DummyConnector] change dummy connector names (#1328)

This commit is contained in:
Mani Chandra
2023-06-21 17:22:06 +05:30
committed by GitHub
parent b0c103a193
commit 6645c4d123
2 changed files with 16 additions and 16 deletions

View File

@ -596,16 +596,16 @@ pub enum Connector {
Cybersource,
Iatapay,
#[cfg(feature = "dummy_connector")]
#[serde(rename = "dummyconnector1")]
#[strum(serialize = "dummyconnector1")]
#[serde(rename = "phonypay")]
#[strum(serialize = "phonypay")]
DummyConnector1,
#[cfg(feature = "dummy_connector")]
#[serde(rename = "dummyconnector2")]
#[strum(serialize = "dummyconnector2")]
#[serde(rename = "fauxpay")]
#[strum(serialize = "fauxpay")]
DummyConnector2,
#[cfg(feature = "dummy_connector")]
#[serde(rename = "dummyconnector3")]
#[strum(serialize = "dummyconnector3")]
#[serde(rename = "pretendpay")]
#[strum(serialize = "pretendpay")]
DummyConnector3,
Opennode,
Bambora,
@ -669,16 +669,16 @@ impl Connector {
#[strum(serialize_all = "snake_case")]
pub enum RoutableConnectors {
#[cfg(feature = "dummy_connector")]
#[serde(rename = "dummyconnector1")]
#[strum(serialize = "dummyconnector1")]
#[serde(rename = "phonypay")]
#[strum(serialize = "phonypay")]
DummyConnector1,
#[cfg(feature = "dummy_connector")]
#[serde(rename = "dummyconnector2")]
#[strum(serialize = "dummyconnector2")]
#[serde(rename = "fauxpay")]
#[strum(serialize = "fauxpay")]
DummyConnector2,
#[cfg(feature = "dummy_connector")]
#[serde(rename = "dummyconnector3")]
#[strum(serialize = "dummyconnector3")]
#[serde(rename = "pretendpay")]
#[strum(serialize = "pretendpay")]
DummyConnector3,
Aci,
Adyen,

View File

@ -75,10 +75,10 @@ where
impl<const T: u8> ConnectorCommon for DummyConnector<T> {
fn id(&self) -> &'static str {
match T {
1 => "dummyconnector1",
2 => "dummyconnector2",
3 => "dummyconnector3",
_ => "dummyconnector",
1 => "phonypay",
2 => "fauxpay",
3 => "pretendpay",
_ => "phonypay",
}
}