-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sample-data-for-user
- Loading branch information
Showing
142 changed files
with
2,764 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
use masking::Secret; | ||
use strum::EnumString; | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
pub enum SetMetaDataRequest { | ||
ProductionAgreement(ProductionAgreementRequest), | ||
SetupProcessor(SetupProcessor), | ||
ConfigureEndpoint, | ||
SetupComplete, | ||
FirstProcessorConnected(ProcessorConnected), | ||
SecondProcessorConnected(ProcessorConnected), | ||
ConfiguredRouting(ConfiguredRouting), | ||
TestPayment(TestPayment), | ||
IntegrationMethod(IntegrationMethod), | ||
IntegrationCompleted, | ||
SPRoutingConfigured(ConfiguredRouting), | ||
SPTestPayment, | ||
DownloadWoocom, | ||
ConfigureWoocom, | ||
SetupWoocomWebhook, | ||
IsMultipleConfiguration, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
pub struct ProductionAgreementRequest { | ||
pub version: String, | ||
#[serde(skip_deserializing)] | ||
pub ip_address: Option<Secret<String, common_utils::pii::IpAddress>>, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
pub struct SetupProcessor { | ||
pub connector_id: String, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
pub struct ProcessorConnected { | ||
pub processor_id: String, | ||
pub processor_name: String, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
pub struct ConfiguredRouting { | ||
pub routing_id: String, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
pub struct TestPayment { | ||
pub payment_id: String, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
pub struct IntegrationMethod { | ||
pub integration_type: String, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, EnumString, serde::Serialize)] | ||
pub enum GetMetaDataRequest { | ||
ProductionAgreement, | ||
SetupProcessor, | ||
ConfigureEndpoint, | ||
SetupComplete, | ||
FirstProcessorConnected, | ||
SecondProcessorConnected, | ||
ConfiguredRouting, | ||
TestPayment, | ||
IntegrationMethod, | ||
IntegrationCompleted, | ||
StripeConnected, | ||
PaypalConnected, | ||
SPRoutingConfigured, | ||
SPTestPayment, | ||
DownloadWoocom, | ||
ConfigureWoocom, | ||
SetupWoocomWebhook, | ||
IsMultipleConfiguration, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
#[serde(transparent)] | ||
pub struct GetMultipleMetaDataPayload { | ||
pub results: Vec<GetMetaDataRequest>, | ||
} | ||
|
||
#[derive(Debug, serde::Deserialize, serde::Serialize)] | ||
pub struct GetMultipleMetaDataRequest { | ||
pub keys: String, | ||
} | ||
|
||
#[derive(Debug, serde::Serialize)] | ||
pub enum GetMetaDataResponse { | ||
ProductionAgreement(bool), | ||
SetupProcessor(Option<SetupProcessor>), | ||
ConfigureEndpoint(bool), | ||
SetupComplete(bool), | ||
FirstProcessorConnected(Option<ProcessorConnected>), | ||
SecondProcessorConnected(Option<ProcessorConnected>), | ||
ConfiguredRouting(Option<ConfiguredRouting>), | ||
TestPayment(Option<TestPayment>), | ||
IntegrationMethod(Option<IntegrationMethod>), | ||
IntegrationCompleted(bool), | ||
StripeConnected(Option<ProcessorConnected>), | ||
PaypalConnected(Option<ProcessorConnected>), | ||
SPRoutingConfigured(Option<ConfiguredRouting>), | ||
SPTestPayment(bool), | ||
DownloadWoocom(bool), | ||
ConfigureWoocom(bool), | ||
SetupWoocomWebhook(bool), | ||
IsMultipleConfiguration(bool), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use common_utils::events::{ApiEventMetric, ApiEventsType}; | ||
|
||
use crate::{admin, enums}; | ||
|
||
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] | ||
pub struct VerifyConnectorRequest { | ||
pub connector_name: enums::Connector, | ||
pub connector_account_details: admin::ConnectorAuthType, | ||
} | ||
|
||
common_utils::impl_misc_api_event_type!(VerifyConnectorRequest); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.