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:
CHALLA NISHANTH BABU
2025-04-29 12:25:31 +05:30
committed by GitHub
parent 600137275f
commit 3d0dd5bd1a
14 changed files with 294 additions and 34 deletions

View File

@ -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
);

View File

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

View File

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

View File

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