mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
feat(core): Adds Billing Connector Invoice Sync flow in Revenue Recovery (#7799)
Co-authored-by: Nishanth Challa <nishanth.challa@Nishanth-Challa-C0WGKCFHLF.local> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
600137275f
commit
3d0dd5bd1a
@ -15,7 +15,7 @@ pub mod update_metadata_flow;
|
||||
use async_trait::async_trait;
|
||||
#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
|
||||
use hyperswitch_domain_models::router_flow_types::{
|
||||
BillingConnectorPaymentsSync, RecoveryRecordBack,
|
||||
BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
|
||||
};
|
||||
use hyperswitch_domain_models::{
|
||||
mandates::CustomerAcceptance,
|
||||
@ -2018,3 +2018,45 @@ default_imp_for_revenue_recovery_record_back!(
|
||||
connector::Wellsfargopayout,
|
||||
connector::Wise
|
||||
);
|
||||
|
||||
#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
|
||||
macro_rules! default_imp_for_billing_connector_invoice_sync {
|
||||
($($path:ident::$connector:ident),*) => {
|
||||
$(
|
||||
impl api::BillingConnectorInvoiceSyncIntegration for $path::$connector {}
|
||||
impl
|
||||
services::ConnectorIntegration<
|
||||
BillingConnectorInvoiceSync,
|
||||
types::BillingConnectorInvoiceSyncRequest,
|
||||
types::BillingConnectorInvoiceSyncResponse,
|
||||
> for $path::$connector
|
||||
{}
|
||||
)*
|
||||
};
|
||||
}
|
||||
#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
|
||||
#[cfg(feature = "dummy_connector")]
|
||||
impl<const T: u8> api::BillingConnectorInvoiceSyncIntegration for connector::DummyConnector<T> {}
|
||||
#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
|
||||
#[cfg(feature = "dummy_connector")]
|
||||
impl<const T: u8>
|
||||
services::ConnectorIntegration<
|
||||
BillingConnectorInvoiceSync,
|
||||
types::BillingConnectorInvoiceSyncRequest,
|
||||
types::BillingConnectorInvoiceSyncResponse,
|
||||
> for connector::DummyConnector<T>
|
||||
{
|
||||
}
|
||||
#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
|
||||
default_imp_for_billing_connector_invoice_sync!(
|
||||
connector::Adyenplatform,
|
||||
connector::Ebanx,
|
||||
connector::Gpayments,
|
||||
connector::Netcetera,
|
||||
connector::Plaid,
|
||||
connector::Signifyd,
|
||||
connector::Stripe,
|
||||
connector::Threedsecureio,
|
||||
connector::Wellsfargopayout,
|
||||
connector::Wise
|
||||
);
|
||||
|
||||
@ -106,6 +106,13 @@ pub type BoxedFilesConnectorIntegrationInterface<T, Req, Resp> =
|
||||
BoxedConnectorIntegrationInterface<T, common_types::FilesFlowData, Req, Resp>;
|
||||
pub type BoxedRevenueRecoveryRecordBackInterface<T, Req, Res> =
|
||||
BoxedConnectorIntegrationInterface<T, common_types::RevenueRecoveryRecordBackData, Req, Res>;
|
||||
pub type BoxedBillingConnectorInvoiceSyncIntegrationInterface<T, Req, Res> =
|
||||
BoxedConnectorIntegrationInterface<
|
||||
T,
|
||||
common_types::BillingConnectorInvoiceSyncFlowData,
|
||||
Req,
|
||||
Res,
|
||||
>;
|
||||
|
||||
pub type BoxedUnifiedAuthenticationServiceInterface<T, Req, Resp> =
|
||||
BoxedConnectorIntegrationInterface<T, common_types::UasFlowData, Req, Resp>;
|
||||
|
||||
@ -57,7 +57,10 @@ pub use hyperswitch_domain_models::{
|
||||
WebhookSourceVerifyData,
|
||||
},
|
||||
router_request_types::{
|
||||
revenue_recovery::{BillingConnectorPaymentsSyncRequest, RevenueRecoveryRecordBackRequest},
|
||||
revenue_recovery::{
|
||||
BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
|
||||
RevenueRecoveryRecordBackRequest,
|
||||
},
|
||||
unified_authentication_service::{
|
||||
UasAuthenticationRequestData, UasAuthenticationResponseData,
|
||||
UasConfirmationRequestData, UasPostAuthenticationRequestData,
|
||||
@ -79,7 +82,8 @@ pub use hyperswitch_domain_models::{
|
||||
},
|
||||
router_response_types::{
|
||||
revenue_recovery::{
|
||||
BillingConnectorPaymentsSyncResponse, RevenueRecoveryRecordBackResponse,
|
||||
BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
|
||||
RevenueRecoveryRecordBackResponse,
|
||||
},
|
||||
AcceptDisputeResponse, CaptureSyncResponse, DefendDisputeResponse, MandateReference,
|
||||
MandateRevokeResponseData, PaymentsResponseData, PreprocessingResponseId,
|
||||
|
||||
@ -57,7 +57,8 @@ pub use hyperswitch_interfaces::{
|
||||
},
|
||||
fraud_check::FraudCheck,
|
||||
revenue_recovery::{
|
||||
BillingConnectorPaymentsSyncIntegration, RevenueRecovery, RevenueRecoveryRecordBack,
|
||||
BillingConnectorInvoiceSyncIntegration, BillingConnectorPaymentsSyncIntegration,
|
||||
RevenueRecovery, RevenueRecoveryRecordBack,
|
||||
},
|
||||
revenue_recovery_v2::RevenueRecoveryV2,
|
||||
BoxedConnector, Connector, ConnectorAccessToken, ConnectorAccessTokenV2, ConnectorCommon,
|
||||
|
||||
Reference in New Issue
Block a user