mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-26 19:04:36 +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
@ -1,12 +1,16 @@
|
||||
//! Revenue Recovery Interface
|
||||
|
||||
use hyperswitch_domain_models::{
|
||||
router_flow_types::{BillingConnectorPaymentsSync, RecoveryRecordBack},
|
||||
router_flow_types::{
|
||||
BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
|
||||
},
|
||||
router_request_types::revenue_recovery::{
|
||||
BillingConnectorPaymentsSyncRequest, RevenueRecoveryRecordBackRequest,
|
||||
BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
|
||||
RevenueRecoveryRecordBackRequest,
|
||||
},
|
||||
router_response_types::revenue_recovery::{
|
||||
BillingConnectorPaymentsSyncResponse, RevenueRecoveryRecordBackResponse,
|
||||
BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
|
||||
RevenueRecoveryRecordBackResponse,
|
||||
},
|
||||
};
|
||||
|
||||
@ -17,7 +21,10 @@ use super::ConnectorIntegration;
|
||||
/// trait RevenueRecovery
|
||||
#[cfg(all(feature = "v2", feature = "revenue_recovery"))]
|
||||
pub trait RevenueRecovery:
|
||||
ConnectorCommon + BillingConnectorPaymentsSyncIntegration + RevenueRecoveryRecordBack
|
||||
ConnectorCommon
|
||||
+ BillingConnectorPaymentsSyncIntegration
|
||||
+ RevenueRecoveryRecordBack
|
||||
+ BillingConnectorInvoiceSyncIntegration
|
||||
{
|
||||
}
|
||||
|
||||
@ -41,6 +48,16 @@ pub trait RevenueRecoveryRecordBack:
|
||||
{
|
||||
}
|
||||
|
||||
/// trait BillingConnectorInvoiceSyncIntegration
|
||||
pub trait BillingConnectorInvoiceSyncIntegration:
|
||||
ConnectorIntegration<
|
||||
BillingConnectorInvoiceSync,
|
||||
BillingConnectorInvoiceSyncRequest,
|
||||
BillingConnectorInvoiceSyncResponse,
|
||||
>
|
||||
{
|
||||
}
|
||||
|
||||
#[cfg(not(all(feature = "v2", feature = "revenue_recovery")))]
|
||||
/// trait RevenueRecovery
|
||||
pub trait RevenueRecovery {}
|
||||
|
||||
@ -2,14 +2,19 @@
|
||||
|
||||
use hyperswitch_domain_models::{
|
||||
router_data_v2::flow_common_types::{
|
||||
BillingConnectorPaymentsSyncFlowData, RevenueRecoveryRecordBackData,
|
||||
BillingConnectorInvoiceSyncFlowData, BillingConnectorPaymentsSyncFlowData,
|
||||
RevenueRecoveryRecordBackData,
|
||||
},
|
||||
router_flow_types::{
|
||||
BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
|
||||
},
|
||||
router_flow_types::{BillingConnectorPaymentsSync, RecoveryRecordBack},
|
||||
router_request_types::revenue_recovery::{
|
||||
BillingConnectorPaymentsSyncRequest, RevenueRecoveryRecordBackRequest,
|
||||
BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
|
||||
RevenueRecoveryRecordBackRequest,
|
||||
},
|
||||
router_response_types::revenue_recovery::{
|
||||
BillingConnectorPaymentsSyncResponse, RevenueRecoveryRecordBackResponse,
|
||||
BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
|
||||
RevenueRecoveryRecordBackResponse,
|
||||
},
|
||||
};
|
||||
|
||||
@ -17,7 +22,9 @@ use crate::connector_integration_v2::ConnectorIntegrationV2;
|
||||
|
||||
/// trait RevenueRecoveryV2
|
||||
pub trait RevenueRecoveryV2:
|
||||
BillingConnectorPaymentsSyncIntegrationV2 + RevenueRecoveryRecordBackV2
|
||||
BillingConnectorPaymentsSyncIntegrationV2
|
||||
+ RevenueRecoveryRecordBackV2
|
||||
+ BillingConnectorInvoiceSyncIntegrationV2
|
||||
{
|
||||
}
|
||||
|
||||
@ -42,3 +49,14 @@ pub trait RevenueRecoveryRecordBackV2:
|
||||
>
|
||||
{
|
||||
}
|
||||
|
||||
/// trait BillingConnectorInvoiceSyncIntegrationV2
|
||||
pub trait BillingConnectorInvoiceSyncIntegrationV2:
|
||||
ConnectorIntegrationV2<
|
||||
BillingConnectorInvoiceSync,
|
||||
BillingConnectorInvoiceSyncFlowData,
|
||||
BillingConnectorInvoiceSyncRequest,
|
||||
BillingConnectorInvoiceSyncResponse,
|
||||
>
|
||||
{
|
||||
}
|
||||
|
||||
@ -19,9 +19,13 @@ use hyperswitch_domain_models::{
|
||||
Authenticate, AuthenticationConfirmation, PostAuthenticate, PreAuthenticate,
|
||||
},
|
||||
webhooks::VerifyWebhookSource,
|
||||
BillingConnectorInvoiceSync,
|
||||
},
|
||||
router_request_types::{
|
||||
revenue_recovery::{BillingConnectorPaymentsSyncRequest, RevenueRecoveryRecordBackRequest},
|
||||
revenue_recovery::{
|
||||
BillingConnectorInvoiceSyncRequest, BillingConnectorPaymentsSyncRequest,
|
||||
RevenueRecoveryRecordBackRequest,
|
||||
},
|
||||
unified_authentication_service::{
|
||||
UasAuthenticationRequestData, UasAuthenticationResponseData,
|
||||
UasConfirmationRequestData, UasPostAuthenticationRequestData,
|
||||
@ -39,7 +43,8 @@ use hyperswitch_domain_models::{
|
||||
},
|
||||
router_response_types::{
|
||||
revenue_recovery::{
|
||||
BillingConnectorPaymentsSyncResponse, RevenueRecoveryRecordBackResponse,
|
||||
BillingConnectorInvoiceSyncResponse, BillingConnectorPaymentsSyncResponse,
|
||||
RevenueRecoveryRecordBackResponse,
|
||||
},
|
||||
AcceptDisputeResponse, DefendDisputeResponse, MandateRevokeResponseData,
|
||||
PaymentsResponseData, RefundsResponseData, RetrieveFileResponse, SubmitEvidenceResponse,
|
||||
@ -245,3 +250,10 @@ pub type BillingConnectorPaymentsSyncType = dyn ConnectorIntegration<
|
||||
BillingConnectorPaymentsSyncRequest,
|
||||
BillingConnectorPaymentsSyncResponse,
|
||||
>;
|
||||
|
||||
/// Type alias for `ConnectorIntegration<BillingConnectorInvoiceSync, BillingConnectorInvoiceSyncRequest, BillingConnectorInvoiceSyncResponse>`
|
||||
pub type BillingConnectorInvoiceSyncType = dyn ConnectorIntegration<
|
||||
BillingConnectorInvoiceSync,
|
||||
BillingConnectorInvoiceSyncRequest,
|
||||
BillingConnectorInvoiceSyncResponse,
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user