//! Payments interface

use hyperswitch_domain_models::{
    router_flow_types::{
        payments::{
            Approve, Authorize, AuthorizeSessionToken, CalculateSurcharge, CalculateTax, Capture,
            CompleteAuthorize, CompleteRefundSurchrge, CompleteSurcharge, CreateConnectorCustomer,
            ExtendAuthorization, GenerateQr, IncrementalAuthorization, PSync, PaymentMethodToken,
            PostCaptureVoid, PostCaptureVoidSync, PostProcessing, PostSessionTokens,
            PreAuthorizeVoid, PreProcessing, PushNotification, Reject, SdkSessionUpdate, Session,
            SettlementSplitCreate, SetupMandate, UpdateMetadata, Void,
        },
        Authenticate, CreateOrder, ExternalVaultProxy, GiftCardBalanceCheck, PostAuthenticate,
        PreAuthenticate, UpdatePostConfirm,
    },
    router_request_types::{
        AuthorizeSessionTokenData, CompleteAuthorizeData, ConnectorCustomerData,
        CreateOrderRequestData, ExternalVaultProxyPaymentsData, GenerateQrRequestData,
        GiftCardBalanceCheckRequestData, PaymentMethodTokenizationData, PaymentsApproveData,
        PaymentsAuthenticateData, PaymentsAuthorizeData, PaymentsCancelData,
        PaymentsCancelPostCaptureData, PaymentsCancelPostCaptureSyncData, PaymentsCaptureData,
        PaymentsCompleteRefundSurchrgeData, PaymentsCompleteSurchargeData,
        PaymentsExtendAuthorizationData, PaymentsIncrementalAuthorizationData,
        PaymentsPostAuthenticateData, PaymentsPostProcessingData, PaymentsPostSessionTokensData,
        PaymentsPreAuthenticateData, PaymentsPreAuthorizeCancelData, PaymentsPreProcessingData,
        PaymentsRejectData, PaymentsSessionData, PaymentsSurchargeCalculationData,
        PaymentsSyncData, PaymentsTaxCalculationData, PaymentsUpdateMetadataData,
        PaymentsUpdatePostConfirmData, PushNotificationRequestData, SdkPaymentsSessionUpdateData,
        SettlementSplitRequestData, SetupMandateRequestData,
    },
    router_response_types::{
        CompleteRefundSurchrgeResponseData, CompleteSurchargeResponseData,
        GiftCardBalanceCheckResponseData, PaymentsResponseData, SurchargeCalculationResponseData,
        TaxCalculationResponseData,
    },
};

use crate::api;

/// trait Payment
pub trait Payment:
    api::ConnectorCommon
    + api::ConnectorSpecifications
    + api::ConnectorValidation
    + PaymentAuthorize
    + PaymentsPreAuthenticate
    + PaymentsAuthenticate
    + PaymentsPostAuthenticate
    + PaymentAuthorizeSessionToken
    + PaymentsCompleteAuthorize
    + PaymentSync
    + PaymentCapture
    + PaymentVoid
    + PaymentPostCaptureVoid
    + PaymentPostCaptureVoidSync
    + PaymentPreAuthorizeVoid
    + PaymentApprove
    + PaymentReject
    + MandateSetup
    + PaymentSession
    + PaymentToken
    + PaymentsPostProcessing
    + PaymentsPushNotification
    + PaymentsGenerateQr
    + ConnectorCustomer
    + PaymentIncrementalAuthorization
    + PaymentExtendAuthorization
    + PaymentSessionUpdate
    + PaymentPostSessionTokens
    + PaymentUpdateMetadata
    + PaymentsCreateOrder
    + ExternalVaultProxyPaymentsCreateV1
    + PaymentsSettlementSplitCreate
    + PaymentsGiftCardBalanceCheck
    + PaymentUpdate
{
}

/// trait PaymentSession
pub trait PaymentSession:
    api::ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData>
{
}

/// trait MandateSetup
pub trait MandateSetup:
    api::ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData>
{
}

/// trait PaymentAuthorize
pub trait PaymentAuthorize:
    api::ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData>
{
}

/// trait PaymentCapture
pub trait PaymentCapture:
    api::ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData>
{
}

/// trait PaymentSync
pub trait PaymentSync:
    api::ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData>
{
}

/// trait PaymentVoid
pub trait PaymentVoid:
    api::ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData>
{
}

/// trait PaymentPostCaptureVoid
pub trait PaymentPostCaptureVoid:
    api::ConnectorIntegration<PostCaptureVoid, PaymentsCancelPostCaptureData, PaymentsResponseData>
{
}

/// trait PaymentPostCaptureVoidSync
pub trait PaymentPostCaptureVoidSync:
    api::ConnectorIntegration<
    PostCaptureVoidSync,
    PaymentsCancelPostCaptureSyncData,
    PaymentsResponseData,
>
{
}

/// trait PaymentPreAuthorizeVoid
pub trait PaymentPreAuthorizeVoid:
    api::ConnectorIntegration<PreAuthorizeVoid, PaymentsPreAuthorizeCancelData, PaymentsResponseData>
{
}

/// trait PaymentExtendAuthorization
pub trait PaymentExtendAuthorization:
    api::ConnectorIntegration<
    ExtendAuthorization,
    PaymentsExtendAuthorizationData,
    PaymentsResponseData,
>
{
}

/// trait PaymentApprove
pub trait PaymentApprove:
    api::ConnectorIntegration<Approve, PaymentsApproveData, PaymentsResponseData>
{
}

/// trait PaymentReject
pub trait PaymentReject:
    api::ConnectorIntegration<Reject, PaymentsRejectData, PaymentsResponseData>
{
}

/// trait PaymentToken
pub trait PaymentToken:
    api::ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData>
{
}

/// trait PaymentAuthorizeSessionToken
pub trait PaymentAuthorizeSessionToken:
    api::ConnectorIntegration<AuthorizeSessionToken, AuthorizeSessionTokenData, PaymentsResponseData>
{
}

/// trait PaymentIncrementalAuthorization
pub trait PaymentIncrementalAuthorization:
    api::ConnectorIntegration<
    IncrementalAuthorization,
    PaymentsIncrementalAuthorizationData,
    PaymentsResponseData,
>
{
}

/// trait TaxCalculation
pub trait TaxCalculation:
    api::ConnectorIntegration<CalculateTax, PaymentsTaxCalculationData, TaxCalculationResponseData>
{
}

/// trait SurchargeCalculation
pub trait SurchargeCalculation:
    api::ConnectorIntegration<
    CalculateSurcharge,
    PaymentsSurchargeCalculationData,
    SurchargeCalculationResponseData,
>
{
}

/// trait SurchargeComplete
pub trait SurchargeComplete:
    api::ConnectorIntegration<
    CompleteSurcharge,
    PaymentsCompleteSurchargeData,
    CompleteSurchargeResponseData,
>
{
}

/// trait SurchargeRefund
pub trait SurchargeRefund:
    api::ConnectorIntegration<
    CompleteRefundSurchrge,
    PaymentsCompleteRefundSurchrgeData,
    CompleteRefundSurchrgeResponseData,
>
{
}

/// trait SessionUpdate
pub trait PaymentSessionUpdate:
    api::ConnectorIntegration<SdkSessionUpdate, SdkPaymentsSessionUpdateData, PaymentsResponseData>
{
}

/// trait PostSessionTokens
pub trait PaymentPostSessionTokens:
    api::ConnectorIntegration<PostSessionTokens, PaymentsPostSessionTokensData, PaymentsResponseData>
{
}

/// trait UpdateMetadata
pub trait PaymentUpdateMetadata:
    api::ConnectorIntegration<UpdateMetadata, PaymentsUpdateMetadataData, PaymentsResponseData>
{
}

/// trait UpdatePostConfirm
pub trait PaymentUpdate:
    api::ConnectorIntegration<UpdatePostConfirm, PaymentsUpdatePostConfirmData, PaymentsResponseData>
{
}

/// trait PaymentsCompleteAuthorize
pub trait PaymentsCompleteAuthorize:
    api::ConnectorIntegration<CompleteAuthorize, CompleteAuthorizeData, PaymentsResponseData>
{
}

/// trait ConnectorCustomer
pub trait ConnectorCustomer:
    api::ConnectorIntegration<CreateConnectorCustomer, ConnectorCustomerData, PaymentsResponseData>
{
}

/// trait PaymentsPreProcessing
pub trait PaymentsPreProcessing:
    api::ConnectorIntegration<PreProcessing, PaymentsPreProcessingData, PaymentsResponseData>
{
}

/// trait PaymentsPreAuthenticate
pub trait PaymentsPreAuthenticate:
    api::ConnectorIntegration<PreAuthenticate, PaymentsPreAuthenticateData, PaymentsResponseData>
{
}

/// trait PaymentsAuthenticate
pub trait PaymentsAuthenticate:
    api::ConnectorIntegration<Authenticate, PaymentsAuthenticateData, PaymentsResponseData>
{
}

/// trait PaymentsPostAuthenticate
pub trait PaymentsPostAuthenticate:
    api::ConnectorIntegration<PostAuthenticate, PaymentsPostAuthenticateData, PaymentsResponseData>
{
}

/// trait PaymentsPostProcessing
pub trait PaymentsPostProcessing:
    api::ConnectorIntegration<PostProcessing, PaymentsPostProcessingData, PaymentsResponseData>
{
}

/// trait PaymentsPushNotification
pub trait PaymentsPushNotification:
    api::ConnectorIntegration<PushNotification, PushNotificationRequestData, PaymentsResponseData>
{
}

/// trait PaymentsGenerateQr
pub trait PaymentsGenerateQr:
    api::ConnectorIntegration<GenerateQr, GenerateQrRequestData, PaymentsResponseData>
{
}

/// trait PaymentsCreateOrder
pub trait PaymentsCreateOrder:
    api::ConnectorIntegration<CreateOrder, CreateOrderRequestData, PaymentsResponseData>
{
}

/// trait ExternalVaultProxyPaymentsCreate
pub trait ExternalVaultProxyPaymentsCreateV1:
    api::ConnectorIntegration<ExternalVaultProxy, ExternalVaultProxyPaymentsData, PaymentsResponseData>
{
}

/// trait PaymentsSettlementSplitCreate
pub trait PaymentsSettlementSplitCreate:
    api::ConnectorIntegration<SettlementSplitCreate, SettlementSplitRequestData, PaymentsResponseData>
{
}

/// trait PaymentsGiftCardBalanceCheck
pub trait PaymentsGiftCardBalanceCheck:
    api::ConnectorIntegration<
    GiftCardBalanceCheck,
    GiftCardBalanceCheckRequestData,
    GiftCardBalanceCheckResponseData,
>
{
}
