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

View File

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