    connectors::Tokenio,
    connectors::Trustpay,
    connectors::Trustpayments,
    connectors::Tsys,
    connectors::UnifiedAuthenticationService,
    connectors::Wise,
    connectors::Worldline,
    connectors::Volt,
    connectors::Worldpay,
    connectors::Worldpayvantiv,
    connectors::Worldpayxml,
    connectors::Wellsfargo,
    connectors::Wellsfargopayout,
    connectors::Xendit,
    connectors::Zen,
    connectors::Zsl
);

#[cfg(feature = "frm")]
macro_rules! default_imp_for_new_connector_integration_frm_fulfillment {
    ($($path:ident::$connector:ident),*) => {
        $(
            impl FraudCheckFulfillmentV2 for $path::$connector {}
            impl
            ConnectorIntegrationV2<
            Fulfillment,
            FrmFlowData,
            FraudCheckFulfillmentData,
            FraudCheckResponseData,
        > for $path::$connector
        {}
    )*
    };
}

#[cfg(feature = "frm")]
default_imp_for_new_connector_integration_frm_fulfillment!(
    connectors::Vgs,
    connectors::Aci,
    connectors::Adyen,
    connectors::Adyenplatform,
    connectors::Affirm,
    connectors::Airwallex,
    connectors::Amazonpay,
    connectors::Authipay,
    connectors::Authorizedotnet,
    connectors::Bambora,
    connectors::Bamboraapac,
    connectors::Bankofamerica,
    connectors::Barclaycard,
    connectors::Billwerk,
    connectors::Bitpay,
    connectors::Blackhawknetwork,
    connectors::Bluecode,
    connectors::Bluesnap,
    connectors::Braintree,
    connectors::Boku,
    connectors::Breadpay,
    connectors::Cashtocode,
    connectors::Celero,
    connectors::Chargebee,
    connectors::Checkbook,
    connectors::Checkout,
    connectors::Coinbase,
    connectors::Coingate,
    connectors::Cryptopay,
    connectors::CtpMastercard,
    connectors::Custombilling,
    connectors::Cybersource,
    connectors::Datatrans,
    connectors::Deutschebank,
    connectors::Digitalvirgo,
    connectors::Dlocal,
    connectors::Dwolla,
    connectors::Ebanx,
    connectors::Elavon,
    connectors::Facilitapay,
    connectors::Finix,
    connectors::Fiserv,
    connectors::Fiservemea,
    connectors::Fiuu,
    connectors::Flexiti,
    connectors::Forte,
    connectors::Getnet,
    connectors::Gigadat,
    connectors::Globalpay,
    connectors::Globepay,
    connectors::Gocardless,
    connectors::Gpayments,
    connectors::Hipay,
    connectors::Helcim,
    connectors::HyperswitchVault,
    connectors::Hyperwallet,
    connectors::Iatapay,
    connectors::Inespay,
    connectors::Itaubank,
    connectors::Jpmorgan,
    connectors::Juspaythreedsserver,
    connectors::Katapult,
    connectors::Klarna,
    connectors::Loonio,
    connectors::Nomupay,
    connectors::Noon,
    connectors::Nordea,
    connectors::Novalnet,
    connectors::Netcetera,
    connectors::Nexinets,
    connectors::Nexixpay,
    connectors::Nmi,
    connectors::Payone,
    connectors::Opayo,
    connectors::Opennode,
    connectors::Nuvei,
    connectors::Paybox,
    connectors::Payeezy,
    connectors::Payload,
    connectors::Payme,
    connectors::Paypal,
    connectors::Paysafe,
    connectors::Paystack,
    connectors::Paytm,
    connectors::Payu,
    connectors::Peachpayments,
    connectors::Phonepe,
    connectors::Placetopay,
    connectors::Plaid,
    connectors::Powertranz,
    connectors::Prophetpay,
    connectors::Mifinity,
    connectors::Mollie,
    connectors::Moneris,
    connectors::Mpgs,
    connectors::Multisafepay,
    connectors::Rapyd,
    connectors::Razorpay,
    connectors::Recurly,
    connectors::Redsys,
    connectors::Riskified,
    connectors::Santander,
    connectors::Shift4,
    connectors::Sift,
    connectors::Silverflow,
    connectors::Signifyd,
    connectors::Stax,
    connectors::Stripe,
    connectors::Square,
    connectors::Stripebilling,
    connectors::Taxjar,
    connectors::Tesouro,
    connectors::Threedsecureio,
    connectors::Thunes,
    connectors::Tokenex,
    connectors::Tokenio,
    connectors::Trustpay,
    connectors::Trustpayments,
    connectors::Tsys,
    connectors::UnifiedAuthenticationService,
    connectors::Wise,
    connectors::Worldline,
    connectors::Volt,
    connectors::Worldpay,
    connectors::Worldpayvantiv,
    connectors::Worldpayxml,
    connectors::Wellsfargo,
    connectors::Wellsfargopayout,
    connectors::Xendit,
    connectors::Zen,
    connectors::Zsl
);

#[cfg(feature = "frm")]
macro_rules! default_imp_for_new_connector_integration_frm_record_return {
    ($($path:ident::$connector:ident),*) => {
        $(
            impl FraudCheckRecordReturnV2 for $path::$connector {}
            impl
            ConnectorIntegrationV2<
            RecordReturn,
            FrmFlowData,
            FraudCheckRecordReturnData,
            FraudCheckResponseData,
        > for $path::$connector
        {}
    )*
    };
}

#[cfg(feature = "frm")]
default_imp_for_new_connector_integration_frm_record_return!(
    connectors::Vgs,
    connectors::Aci,
    connectors::Adyen,
    connectors::Adyenplatform,
    connectors::Affirm,
    connectors::Airwallex,
    connectors::Amazonpay,
    connectors::Authipay,
    connectors::Authorizedotnet,
    connectors::Bambora,
    connectors::Bamboraapac,
    connectors::Bankofamerica,
    connectors::Barclaycard,
    connectors::Billwerk,
    connectors::Bitpay,
    connectors::Blackhawknetwork,
    connectors::Bluecode,
    connectors::Bluesnap,
    connectors::Braintree,
    connectors::Boku,
    connectors::Breadpay,
    connectors::Cashtocode,
    connectors::Celero,
    connectors::Chargebee,
    connectors::Checkbook,
    connectors::Checkout,
    connectors::Coinbase,
    connectors::Coingate,
    connectors::Cryptopay,
    connectors::CtpMastercard,
    connectors::Custombilling,
    connectors::Cybersource,
    connectors::Datatrans,
    connectors::Deutschebank,
    connectors::Digitalvirgo,
    connectors::Dlocal,
    connectors::Dwolla,
    connectors::Ebanx,
    connectors::Elavon,
    connectors::Facilitapay,
    connectors::Finix,
    connectors::Fiserv,
    connectors::Fiservemea,
    connectors::Fiuu,
    connectors::Flexiti,
    connectors::Forte,
    connectors::Getnet,
    connectors::Gigadat,
    connectors::Globalpay,
    connectors::Globepay,
    connectors::Gocardless,
    connectors::Gpayments,
    connectors::Hipay,
    connectors::Helcim,
    connectors::HyperswitchVault,
    connectors::Hyperwallet,
    connectors::Iatapay,
    connectors::Inespay,
    connectors::Itaubank,
    connectors::Jpmorgan,
    connectors::Juspaythreedsserver,
    connectors::Katapult,
    connectors::Klarna,
    connectors::Loonio,
    connectors::Nomupay,
    connectors::Noon,
    connectors::Nordea,
    connectors::Novalnet,
    connectors::Netcetera,
    connectors::Nexinets,
    connectors::Nexixpay,
    connectors::Nmi,
    connectors::Payone,
    connectors::Opayo,
    connectors::Opennode,
    connectors::Nuvei,
    connectors::Paybox,
    connectors::Payeezy,
    connectors::Payload,
    connectors::Payme,
    connectors::Paypal,
    connectors::Paysafe,
    connectors::Paystack,
    connectors::Paytm,
    connectors::Payu,
    connectors::Peachpayments,
    connectors::Phonepe,
    connectors::Placetopay,
    connectors::Plaid,
    connectors::Powertranz,
    connectors::Prophetpay,
    connectors::Mifinity,
    connectors::Mollie,
    connectors::Moneris,
    connectors::Mpgs,
    connectors::Multisafepay,
    connectors::Rapyd,
    connectors::Razorpay,
    connectors::Recurly,
    connectors::Redsys,
    connectors::Riskified,
    connectors::Santander,
    connectors::Shift4,
    connectors::Sift,
    connectors::Silverflow,
    connectors::Signifyd,
    connectors::Stax,
    connectors::Stripe,
    connectors::Square,
    connectors::Stripebilling,
    connectors::Taxjar,
    connectors::Tesouro,
    connectors::Threedsecureio,
    connectors::Thunes,
    connectors::Tokenex,
    connectors::Tokenio,
    connectors::Trustpay,
    connectors::Trustpayments,
    connectors::Tsys,
    connectors::UnifiedAuthenticationService,
    connectors::Wise,
    connectors::Worldline,
    connectors::Volt,
    connectors::Worldpay,
    connectors::Worldpayvantiv,
    connectors::Worldpayxml,
    connectors::Wellsfargo,
    connectors::Wellsfargopayout,
    connectors::Xendit,
    connectors::Zen,
    connectors::Zsl
);

macro_rules! default_imp_for_new_connector_integration_revoking_mandates {
    ($($path:ident::$connector:ident),*) => {
        $( impl ConnectorMandateRevokeV2 for $path::$connector {}
            impl
            ConnectorIntegrationV2<
            MandateRevoke,
            MandateRevokeFlowData,
            MandateRevokeRequestData,
            MandateRevokeResponseData,
        > for $path::$connector
        {}
    )*
    };
}

default_imp_for_new_connector_integration_revoking_mandates!(
    connectors::Paysafe,
    connectors::Vgs,
    connectors::Aci,
    connectors::Adyen,
    connectors::Adyenplatform,
    connectors::Affirm,
    connectors::Airwallex,
    connectors::Amazonpay,
    connectors::Authipay,
    connectors::Authorizedotnet,
    connectors::Bambora,
    connectors::Bamboraapac,
    connectors::Bankofamerica,
    connectors::Barclaycard,
    connectors::Billwerk,
    connectors::Bitpay,
    connectors::Blackhawknetwork,
    connectors::Bluecode,
    connectors::Bluesnap,
    connectors::Braintree,
    connectors::Boku,
    connectors::Breadpay,
    connectors::Cashtocode,
    connectors::Celero,
    connectors::Chargebee,
    connectors::Checkbook,
    connectors::Checkout,
    connectors::Coinbase,
    connectors::Coingate,
    connectors::Cryptopay,
    connectors::CtpMastercard,
    connectors::Custombilling,
    connectors::Cybersource,
    connectors::Datatrans,
    connectors::Deutschebank,
    connectors::Digitalvirgo,
    connectors::Dlocal,
    connectors::Dwolla,
    connectors::Ebanx,
    connectors::Elavon,
    connectors::Facilitapay,
    connectors::Finix,
    connectors::Fiserv,
    connectors::Fiservemea,
    connectors::Fiuu,
    connectors::Flexiti,
    connectors::Forte,
    connectors::Getnet,
    connectors::Gigadat,
    connectors::Globalpay,
    connectors::Globepay,
    connectors::Gocardless,
    connectors::Gpayments,
    connectors::Hipay,
    connectors::Helcim,
    connectors::HyperswitchVault,
    connectors::Hyperwallet,
    connectors::Iatapay,
    connectors::Inespay,
    connectors::Itaubank,
    connectors::Jpmorgan,
    connectors::Juspaythreedsserver,
    connectors::Katapult,
    connectors::Klarna,
    connectors::Loonio,
    connectors::Nomupay,
    connectors::Noon,
    connectors::Nordea,
    connectors::Novalnet,
    connectors::Netcetera,
    connectors::Nexinets,
    connectors::Nexixpay,
    connectors::Nmi,
    connectors::Payone,
    connectors::Opayo,
    connectors::Opennode,
    connectors::Nuvei,
    connectors::Paybox,
    connectors::Payeezy,
    connectors::Payload,
    connectors::Payme,
    connectors::Paystack,
    connectors::Paytm,
    connectors::Payu,
    connectors::Peachpayments,
    connectors::Phonepe,
    connectors::Placetopay,
    connectors::Plaid,
    connectors::Powertranz,
    connectors::Prophetpay,
    connectors::Mifinity,
    connectors::Mollie,
    connectors::Moneris,
    connectors::Mpgs,
    connectors::Multisafepay,
    connectors::Rapyd,
    connectors::Razorpay,
    connectors::Recurly,
    connectors::Redsys,
    connectors::Riskified,
    connectors::Santander,
    connectors::Shift4,
    connectors::Sift,
    connectors::Silverflow,
    connectors::Signifyd,
    connectors::Stax,
    connectors::Stripe,
    connectors::Square,
    connectors::Stripebilling,
    connectors::Taxjar,
    connectors::Tesouro,
    connectors::Threedsecureio,
    connectors::Thunes,
    connectors::Tokenex,
    connectors::Tokenio,
    connectors::Trustpay,
    connectors::Trustpayments,
    connectors::Tsys,
    connectors::UnifiedAuthenticationService,
    connectors::Wise,
    connectors::Worldline,
    connectors::Volt,
    connectors::Worldpay,
    connectors::Worldpayvantiv,
    connectors::Worldpayxml,
    connectors::Wellsfargo,
    connectors::Wellsfargopayout,
    connectors::Xendit,
    connectors::Zen,
    connectors::Zsl
);

#[cfg(feature = "frm")]
macro_rules! default_imp_for_new_connector_integration_frm {
    ($($path:ident::$connector:ident),*) => {
        $(
            impl FraudCheckV2 for $path::$connector {}
    )*
    };
}

#[cfg(feature = "frm")]
default_imp_for_new_connector_integration_frm!(
    connectors::Loonio,
    connectors::Gigadat,
    connectors::Affirm,
    connectors::Paytm,
    connectors::Airwallex,
    connectors::Amazonpay,
    connectors::Authipay,
    connectors::Bambora,
    connectors::Bamboraapac,
    connectors::Barclaycard,
    connectors::Billwerk,
    connectors::Bitpay,
    connectors::Blackhawknetwork,
    connectors::Bluecode,
    connectors::Bluesnap,
    connectors::Boku,
    connectors::Breadpay,
    connectors::Cashtocode,
    connectors::Celero,
    connectors::Checkbook,
    connectors::Coinbase,
    connectors::Cryptopay,
    connectors::CtpMastercard,
    connectors::Custombilling,
    connectors::Datatrans,
    connectors::Deutschebank,
    connectors::Digitalvirgo,
    connectors::Dlocal,
    connectors::Dwolla,
    connectors::Ebanx,
    connectors::Elavon,
    connectors::Facilitapay,
    connectors::Finix,
    connectors::Fiserv,
    connectors::Fiservemea,
    connectors::Fiuu,
    connectors::Flexiti,
    connectors::Forte,
    connectors::Globepay,
    connectors::Gocardless,
    connectors::Gpayments,
    connectors::Helcim,
    connectors::Hipay,
    connectors::HyperswitchVault,
    connectors::Hyperwallet,
    connectors::Inespay,
    connectors::Jpmorgan,
    connectors::Juspaythreedsserver,
    connectors::Katapult,
    connectors::Mpgs,
    connectors::Mollie,
    connectors::Multisafepay,
    connectors::Netcetera,
    connectors::Nexinets,
    connectors::Nexixpay,
    connectors::Nmi,
    connectors::Nomupay,
    connectors::Nordea,
    connectors::Novalnet,
    connectors::Paybox,
    connectors::Payeezy,
    connectors::Payload,
    connectors::Payone,
    connectors::Paysafe,
    connectors::Payu,
    connectors::Peachpayments,
    connectors::Phonepe,
    connectors::Placetopay,
    connectors::Plaid,
    connectors::Powertranz,
    connectors::Prophetpay,
    connectors::Rapyd,
    connectors::Razorpay,
    connectors::Recurly,
    connectors::Redsys,
    connectors::Riskified,
    connectors::Santander,
    connectors::Shift4,
    connectors::Sift,
    connectors::Silverflow,
    connectors::Signifyd,
    connectors::Stax,
    connectors::Stripe,
    connectors::Square,
    connectors::Taxjar,
    connectors::Tesouro,
    connectors::Threedsecureio,
    connectors::Thunes,
    connectors::Tokenex,
    connectors::Tokenio,
    connectors::Trustpayments,
    connectors::Tsys,
    connectors::UnifiedAuthenticationService,
    connectors::Vgs,
    connectors::Volt,
    connectors::Wise,
    connectors::Worldline,
    connectors::Worldpay,
    connectors::Worldpayvantiv,
    connectors::Worldpayxml,
    connectors::Xendit,
    connectors::Zen,
    connectors::Zsl
);

macro_rules! default_imp_for_new_connector_integration_connector_authentication {
    ($($path:ident::$connector:ident),*) => {
        $( impl ExternalAuthenticationV2 for $path::$connector {}
            impl ConnectorAuthenticationV2 for $path::$connector {}
            impl ConnectorPreAuthenticationV2 for $path::$connector {}
            impl ConnectorPreAuthenticationVersionCallV2 for $path::$connector {}
            impl ConnectorPostAuthenticationV2 for $path::$connector {}
            impl
            ConnectorIntegrationV2<
            Authentication,
            ExternalAuthenticationFlowData,
            authentication::ConnectorAuthenticationRequestData,
            AuthenticationResponseData,
        > for $path::$connector
        {}
        impl
            ConnectorIntegrationV2<
            PreAuthentication,
            ExternalAuthenticationFlowData,
            authentication::PreAuthNRequestData,
            AuthenticationResponseData,
        > for $path::$connector
        {}
        impl
            ConnectorIntegrationV2<
            PreAuthenticationVersionCall,
            ExternalAuthenticationFlowData,
            authentication::PreAuthNRequestData,
            AuthenticationResponseData,
        > for $path::$connector
        {}
        impl
            ConnectorIntegrationV2<
            PostAuthentication,
            ExternalAuthenticationFlowData,
            authentication::ConnectorPostAuthenticationRequestData,
            AuthenticationResponseData,
        > for $path::$connector
        {}
    )*
    };
}

default_imp_for_new_connector_integration_connector_authentication!(
    connectors::Loonio,
    connectors::Gigadat,
    connectors::Affirm,
    connectors::Paytm,
    connectors::Airwallex,
    connectors::Amazonpay,
    connectors::Authipay,
    connectors::Bambora,
    connectors::Bamboraapac,
    connectors::Barclaycard,
    connectors::Billwerk,
    connectors::Bitpay,
    connectors::Blackhawknetwork,
    connectors::Bluecode,
    connectors::Bluesnap,
    connectors::Boku,
    connectors::Breadpay,
    connectors::Cashtocode,
    connectors::Celero,
    connectors::Checkbook,
    connectors::Coinbase,
    connectors::Cryptopay,
    connectors::CtpMastercard,
    connectors::Custombilling,
    connectors::Datatrans,
    connectors::Deutschebank,
    connectors::Digitalvirgo,
    connectors::Dlocal,
    connectors::Dwolla,
    connectors::Ebanx,
    connectors::Elavon,
    connectors::Facilitapay,
    connectors::Finix,
    connectors::Fiserv,
    connectors::Fiservemea,
    connectors::Fiuu,
    connectors::Flexiti,
    connectors::Forte,
    connectors::Globepay,
    connectors::Gocardless,
    connectors::Gpayments,
    connectors::Helcim,
    connectors::Hipay,
    connectors::HyperswitchVault,
    connectors::Hyperwallet,
    connectors::Inespay,
    connectors::Jpmorgan,
    connectors::Juspaythreedsserver,
    connectors::Katapult,
    connectors::Mpgs,
    connectors::Mollie,
    connectors::Multisafepay,
    connectors::Netcetera,
    connectors::Nexinets,
    connectors::Nexixpay,
    connectors::Nomupay,
    connectors::Nordea,
    connectors::Novalnet,
    connectors::Paybox,
    connectors::Payeezy,
    connectors::Payload,
    connectors::Paysafe,
    connectors::Payu,
    connectors::Peachpayments,
    connectors::Phonepe,
    connectors::Placetopay,
    connectors::Plaid,
    connectors::Powertranz,
    connectors::Prophetpay,
    connectors::Rapyd,
    connectors::Razorpay,
    connectors::Recurly,
    connectors::Redsys,
    connectors::Riskified,
    connectors::Santander,
    connectors::Shift4,
    connectors::Sift,
    connectors::Silverflow,
    connectors::Signifyd,
    connectors::Stax,
    connectors::Stripe,
    connectors::Square,
    connectors::Taxjar,
    connectors::Tesouro,
    connectors::Threedsecureio,
    connectors::Thunes,
    connectors::Tokenex,
    connectors::Tokenio,
    connectors::Trustpayments,
    connectors::Tsys,
    connectors::UnifiedAuthenticationService,
    connectors::Vgs,
    connectors::Volt,
    connectors::Wise,
    connectors::Worldline,
    connectors::Worldpay,
    connectors::Worldpayvantiv,
    connectors::Worldpayxml,
    connectors::Xendit,
    connectors::Zen,
    connectors::Zsl
);

macro_rules! default_imp_for_new_connector_integration_revenue_recovery {
    ($($path:ident::$connector:ident),*) => {
        $(  impl RevenueRecoveryV2 for $path::$connector {}
            impl BillingConnectorPaymentsSyncIntegrationV2 for $path::$connector {}
            impl RevenueRecoveryRecordBackV2 for $path::$connector {}
            impl BillingConnectorInvoiceSyncIntegrationV2 for $path::$connector {}
            impl
            ConnectorIntegrationV2<
                InvoiceRecordBack,
                InvoiceRecordBackData,
                InvoiceRecordBackRequest,
                InvoiceRecordBackResponse,
                > for $path::$connector
            {}
            impl
                ConnectorIntegrationV2<
                BillingConnectorPaymentsSync,
                BillingConnectorPaymentsSyncFlowData,
                BillingConnectorPaymentsSyncRequest,
                BillingConnectorPaymentsSyncResponse,
            > for $path::$connector
            {}
            impl
                ConnectorIntegrationV2<
                BillingConnectorInvoiceSync,
                BillingConnectorInvoiceSyncFlowData,
                BillingConnectorInvoiceSyncRequest,
                BillingConnectorInvoiceSyncResponse,
            > for $path::$connector
            {}
    )*
    };
}

default_imp_for_new_connector_integration_revenue_recovery!(
    connectors::Loonio,
    connectors::Gigadat,
    connectors::Affirm,
    connectors::Paytm,
    connectors::Airwallex,
    connectors::Amazonpay,
    connectors::Authipay,
    connectors::Bambora,
    connectors::Bamboraapac,
    connectors::Barclaycard,
    connectors::Billwerk,
    connectors::Bitpay,
    connectors::Blackhawknetwork,
    connectors::Bluecode,
    connectors::Bluesnap,
    connectors::Boku,
    connectors::Breadpay,
    connectors::Cashtocode,
    connectors::Celero,
    connectors::Checkbook,
    connectors::Coinbase,
    connectors::Cryptopay,
    connectors::CtpMastercard,
    connectors::Custombilling,
    connectors::Datatrans,
    connectors::Deutschebank,
    connectors::Digitalvirgo,
    connectors::Dlocal,
    connectors::Dwolla,
    connectors::Ebanx,
    connectors::Elavon,
    connectors::Facilitapay,
    connectors::Finix,
    connectors::Fiserv,
    connectors::Fiservemea,
    connectors::Fiuu,
    connectors::Flexiti,
    connectors::Forte,
    connectors::Globepay,
    connectors::Gocardless,
    connectors::Gpayments,
    connectors::Helcim,
    connectors::Hipay,
    connectors::HyperswitchVault,
    connectors::Hyperwallet,
    connectors::Inespay,
    connectors::Jpmorgan,
    connectors::Juspaythreedsserver,
    connectors::Katapult,
    connectors::Mpgs,
    connectors::Mollie,
    connectors::Multisafepay,
    connectors::Netcetera,
    connectors::Nexinets,
    connectors::Nexixpay,
    connectors::Nmi,
    connectors::Nomupay,
    connectors::Nordea,
    connectors::Novalnet,
    connectors::Paybox,
    connectors::Payeezy,
    connectors::Payload,
    connectors::Payone,
    connectors::Paysafe,
    connectors::Payu,
    connectors::Peachpayments,
    connectors::Phonepe,
    connectors::Placetopay,
    connectors::Plaid,
    connectors::Powertranz,
    connectors::Prophetpay,
    connectors::Rapyd,
    connectors::Razorpay,
    connectors::Redsys,
    connectors::Riskified,
    connectors::Santander,
    connectors::Shift4,
    connectors::Sift,
    connectors::Silverflow,
    connectors::Signifyd,
    connectors::Stax,
    connectors::Stripe,
    connectors::Square,
    connectors::Taxjar,
    connectors::Tesouro,
    connectors::Threedsecureio,
    connectors::Thunes,
    connectors::Tokenex,
    connectors::Tokenio,
    connectors::Trustpayments,
    connectors::Tsys,
    connectors::UnifiedAuthenticationService,
    connectors::Vgs,
    connectors::Volt,
    connectors::Wise,
    connectors::Worldline,
    connectors::Worldpay,
    connectors::Worldpayvantiv,
    connectors::Worldpayxml,
    connectors::Xendit,
    connectors::Zen,
    connectors::Zsl
);

macro_rules! default_imp_for_new_connector_integration_external_vault {
    ($($path:ident::$connector:ident),*) => {
        $(
            impl ExternalVaultInsertV2 for $path::$connector {}
            impl ExternalVaultRetrieveV2 for $path::$connector {}
            impl ExternalVaultDeleteV2 for $path::$connector {}
            impl ExternalVaultCreateV2 for $path::$connector {}
            impl
            ConnectorIntegrationV2<
            ExternalVaultInsertFlow,
            VaultConnectorFlowData,
            VaultRequestData,
            VaultResponseData,
        > for $path::$connector
        {}
        impl
            ConnectorIntegrationV2<
            ExternalVaultRetrieveFlow,
            VaultConnectorFlowData,
            VaultRequestData,
            VaultResponseData,
        > for $path::$connector
        {}
        impl
            ConnectorIntegrationV2<
            ExternalVaultDeleteFlow,
            VaultConnectorFlowData,
            VaultRequestData,
            VaultResponseData,
        > for $path::$connector
        {}
        impl
            ConnectorIntegrationV2<
            ExternalVaultCreateFlow,
            VaultConnectorFlowData,
            VaultRequestData,
            VaultResponseData,
        > for $path::$connector
        {}
    )*
    };
}

default_imp_for_new_connector_integration_external_vault!(
    connectors::Aci,
    connectors::Adyen,
    connectors::Adyenplatform,
    connectors::Affirm,
    connectors::Airwallex,
    connectors::Amazonpay,
    connectors::Archipel,
    connectors::Authipay,
    connectors::Authorizedotnet,
    connectors::Barclaycard,
    connectors::Bambora,
    connectors::Bamboraapac,
    connectors::Bankofamerica,
    connectors::Billwerk,
    connectors::Bitpay,
    connectors::Blackhawknetwork,
    connectors::Bluecode,
    connectors::Bluesnap,
    connectors::Braintree,
    connectors::Boku,
    connectors::Breadpay,
    connectors::Cashtocode,
    connectors::Celero,
    connectors::Chargebee,
    connectors::Checkbook,
    connectors::Checkout,
    connectors::Coinbase,
    connectors::Coingate,
    connectors::Cryptopay,
    connectors::CtpMastercard,
    connectors::Custombilling,
    connectors::Cybersource,
    connectors::Datatrans,
    connectors::Deutschebank,
    connectors::Digitalvirgo,
    connectors::Dlocal,
    connectors::Dwolla,
    connectors::Ebanx,
    connectors::Elavon,
    connectors::Facilitapay,
    connectors::Finix,
    connectors::Fiserv,
    connectors::Fiservemea,
    connectors::Fiuu,
    connectors::Flexiti,
    connectors::Forte,
    connectors::Getnet,
    connectors::Gigadat,
    connectors::Globalpay,
    connectors::Globepay,
    connectors::Gocardless,
    connectors::Gpayments,
    connectors::Hipay,
    connectors::Helcim,
    connectors::HyperswitchVault,
    connectors::Hyperwallet,
    connectors::Iatapay,
    connectors::Inespay,
    connectors::Itaubank,
    connectors::Jpmorgan,
    connectors::Juspaythreedsserver,
    connectors::Katapult,
    connectors::Klarna,
    connectors::Loonio,
    connectors::Netcetera,
    connectors::Nordea,
    connectors::Nomupay,
    connectors::Noon,
    connectors::Novalnet,
    connectors::Nexinets,
    connectors::Nexixpay,
    connectors::Opayo,
    connectors::Opennode,
    connectors::Nuvei,
    connectors::Nmi,
    connectors::Payone,
    connectors::Paybox,
    connectors::Payeezy,
    connectors::Payload,
    connectors::Payme,
    connectors::Paypal,
    connectors::Paysafe,
    connectors::Paystack,
    connectors::Paytm,
    connectors::Payu,
    connectors::Peachpayments,
    connectors::Phonepe,
    connectors::Placetopay,
    connectors::Powertranz,
    connectors::Prophetpay,
    connectors::Mifinity,
    connectors::Mollie,
    connectors::Moneris,
    connectors::Mpgs,
    connectors::Multisafepay,
    connectors::Plaid,
    connectors::Rapyd,
    connectors::Razorpay,
    connectors::Recurly,
    connectors::Redsys,
    connectors::Riskified,
    connectors::Santander,
    connectors::Shift4,
    connectors::Sift,
    connectors::Silverflow,
    connectors::Signifyd,
    connectors::Stax,
    connectors::Square,
    connectors::Stripe,
    connectors::Stripebilling,
    connectors::Taxjar,
    connectors::Tesouro,
    connectors::Threedsecureio,
    connectors::Thunes,
    connectors::Tokenex,
    connectors::Tokenio,
    connectors::Trustpay,
    connectors::Trustpayments,
    connectors::Tsys,
    connectors::UnifiedAuthenticationService,
    connectors::Vgs,
    connectors::Volt,
    connectors::Worldline,
    connectors::Wise,
    connectors::Worldpay,
    connectors::Worldpayvantiv,
    connectors::Worldpayxml,
    connectors::Wellsfargo,
    connectors::Wellsfargopayout,
    connectors::Xendit,
    connectors::Zen,
    connectors::Zsl
);

macro_rules! default_imp_for_new_connector_integration_external_vault_proxy {
    ($($path:ident::$connector:ident),*) => {
        $(
            impl ExternalVaultProxyPaymentsCreate for $path::$connector {}
            impl
            ConnectorIntegrationV2<
            ExternalVaultProxy,
            PaymentFlowData,
            ExternalVaultProxyPaymentsData,
            PaymentsResponseData> for $path::$connector
            {}
    )*
    };
}

default_imp_for_new_connector_integration_external_vault_proxy!(
    connectors::Aci,
    connectors::Adyen,
    connectors::Adyenplatform,
    connectors::Affirm,
    connectors::Airwallex,
    connectors::Amazonpay,
    connectors::Archipel,
    connectors::Authipay,
    connectors::Authorizedotnet,
    connectors::Bambora,
    connectors::Bamboraapac,
    connectors::Bankofamerica,
    connectors::Barclaycard,
    connectors::Billwerk,
    connectors::Bitpay,
    connectors::Blackhawknetwork,
    connectors::Bluecode,
    connectors::Bluesnap,
    connectors::Braintree,
    connectors::Breadpay,
    connectors::Boku,
    connectors::Cashtocode,
    connectors::Celero,
    connectors::Chargebee,
    connectors::Checkbook,
    connectors::Checkout,
    connectors::Coinbase,
    connectors::Coingate,
    connectors::Cryptopay,
    connectors::Custombilling,
    connectors::Cybersource,
    connectors::Datatrans,
    connectors::Deutschebank,
    connectors::Digitalvirgo,
    connectors::Dlocal,
    connectors::Dwolla,
    connectors::Ebanx,
    connectors::Elavon,
    connectors::Facilitapay,
    connectors::Finix,
    connectors::Fiserv,
    connectors::Fiservemea,
    connectors::Fiuu,
    connectors::Flexiti,
    connectors::Forte,
    connectors::Getnet,
    connectors::Gigadat,
    connectors::Globalpay,
    connectors::Globepay,
    connectors::Gocardless,
    connectors::Gpayments,
    connectors::Hipay,
    connectors::Helcim,
    connectors::HyperswitchVault,
    connectors::Hyperwallet,
    connectors::Iatapay,
    connectors::Inespay,
    connectors::Itaubank,
    connectors::Jpmorgan,
    connectors::Juspaythreedsserver,
    connectors::Katapult,
    connectors::Klarna,
    connectors::Loonio,
    connectors::Mifinity,
    connectors::Mollie,
    connectors::Moneris,
    connectors::Mpgs,
    connectors::Multisafepay,
    connectors::Netcetera,
    connectors::Nmi,
    connectors::Nomupay,
    connectors::Noon,
    connectors::Nordea,
    connectors::Novalnet,
    connectors::Nexinets,
    connectors::Nexixpay,
    connectors::Opayo,
    connectors::Opennode,
    connectors::Nuvei,
    connectors::Paybox,
    connectors::Payeezy,
    connectors::Payload,
    connectors::Payme,
    connectors::Payone,
    connectors::Paypal,
    connectors::Paysafe,
    connectors::Paystack,
    connectors::Paytm,
    connectors::Payu,
    connectors::Peachpayments,
    connectors::Phonepe,
    connectors::Placetopay,
    connectors::Plaid,
    connectors::Powertranz,
    connectors::Prophetpay,
    connectors::Rapyd,
    connectors::Razorpay,
    connectors::Recurly,
    connectors::Redsys,
    connectors::Riskified,
    connectors::Santander,
    connectors::Shift4,
    connectors::Sift,
    connectors::Silverflow,
    connectors::Signifyd,
    connectors::Stax,
    connectors::Square,
    connectors::Stripe,
    connectors::Stripebilling,
    connectors::Taxjar,
    connectors::Tesouro,
    connectors::Threedsecureio,
    connectors::Thunes,
    connectors::Tokenex,
    connectors::Tokenio,
    connectors::Trustpay,
    connectors::Trustpayments,
    connectors::Tsys,
    connectors::UnifiedAuthenticationService,
    connectors::Wise,
    connectors::Worldline,
    connectors::Worldpay,
    connectors::Worldpayvantiv,
    connectors::Worldpayxml,
    connectors::Wellsfargo,
    connectors::Wellsfargopayout,
    connectors::Vgs,
    connectors::Volt,
    connectors::Xendit,
    connectors::Zen,
    connectors::Zsl,
    connectors::CtpMastercard
);


// Struct: BlocklistFingerprint
// File: crates/diesel_models/src/blocklist_fingerprint.rs
// Module: diesel_models
// Implementations: 0

pub struct BlocklistFingerprint


// Struct: WellsfargoRefundResponse
// File: crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct WellsfargoRefundResponse


// Struct: ApiKeyExpiryReminder
// File: crates/router/src/services/email/types.rs
// Module: router
// Implementations: 1
// Traits: EmailData

pub struct ApiKeyExpiryReminder


// Struct: RoutingProfileMetadata
// File: crates/diesel_models/src/routing_algorithm.rs
// Module: diesel_models
// Implementations: 1

pub struct RoutingProfileMetadata


// Function: get_pending_captures
// File: crates/router/src/core/payments/types.rs
// Module: router

pub fn get_pending_captures(&self) -> Vec<&storage::Capture>


// Implementation: impl AuthServiceConnector for for T
// File: crates/pm_auth/src/types/api.rs
// Module: pm_auth
// Methods: 0 total (0 public)

impl AuthServiceConnector for for T


// Implementation: impl api::ConnectorAccessToken for for Noon
// File: crates/hyperswitch_connectors/src/connectors/noon.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::ConnectorAccessToken for for Noon


// Struct: UserMerchantAccountResponse
// File: crates/api_models/src/user.rs
// Module: api_models
// Implementations: 0

pub struct UserMerchantAccountResponse


// Struct: ContactDetails
// File: crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct ContactDetails


// Struct: ExternalVaultProxy
// File: crates/hyperswitch_domain_models/src/router_flow_types/payments.rs
// Module: hyperswitch_domain_models
// Implementations: 0

pub struct ExternalVaultProxy


// Struct: PostAuthenticate
// File: crates/hyperswitch_domain_models/src/router_flow_types/unified_authentication_service.rs
// Module: hyperswitch_domain_models
// Implementations: 0

pub struct PostAuthenticate


// Implementation: impl MerchantCountryCode
// File: crates/common_types/src/payments.rs
// Module: common_types
// Methods: 3 total (3 public)

impl MerchantCountryCode


// Struct: NetworkTokenResponse
// File: crates/api_models/src/payment_methods.rs
// Module: api_models
// Implementations: 0

pub struct NetworkTokenResponse


// Function: find_by_theme_id
// File: crates/diesel_models/src/query/user/theme.rs
// Module: diesel_models

pub fn find_by_theme_id(conn: &PgPooledConn, theme_id: String) -> StorageResult<Self>


// Function: create_merchant_connector_account
// File: crates/diesel_models/src/merchant_connector_account.rs
// Module: diesel_models

pub fn create_merchant_connector_account(
        self,
        source: MerchantConnectorAccount,
    ) -> MerchantConnectorAccount


// Implementation: impl api::ConnectorMandateRevoke for for Braintree
// File: crates/hyperswitch_connectors/src/connectors/braintree.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::ConnectorMandateRevoke for for Braintree


// Struct: HeaderKey
// File: crates/test_utils/src/connector_auth.rs
// Module: test_utils
// Implementations: 0

pub struct HeaderKey


// Implementation: impl api::Payment for for Zsl
// File: crates/hyperswitch_connectors/src/connectors/zsl.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::Payment for for Zsl


// File: crates/api_models/src/analytics/routing_events.rs
// Module: api_models
// Public structs: 1

#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
pub struct RoutingEventsRequest {
    pub payment_id: common_utils::id_type::PaymentId,
    pub refund_id: Option<String>,
    pub dispute_id: Option<String>,
}


// Trait: DisputeMetricAnalytics
// File: crates/analytics/src/disputes/metrics.rs
// Module: analytics

pub trait DisputeMetricAnalytics: LoadRow<DisputeMetricRow>


// Struct: TokenizedCardValue2
// File: crates/hyperswitch_domain_models/src/payment_method_data.rs
// Module: hyperswitch_domain_models
// Implementations: 0

pub struct TokenizedCardValue2


// Implementation: impl api::PaymentVoid for for Bluesnap
// File: crates/hyperswitch_connectors/src/connectors/bluesnap.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::PaymentVoid for for Bluesnap


// Function: validate
// File: crates/redis_interface/src/types.rs
// Module: redis_interface

// Documentation: Validates the Redis configuration provided.

pub fn validate(&self) -> CustomResult<(), errors::RedisError>


// Implementation: impl ForexMetric for for RefundMetrics
// File: crates/api_models/src/analytics/refunds.rs
// Module: api_models
// Methods: 1 total (0 public)

impl ForexMetric for for RefundMetrics


// Implementation: impl api::Refund for for Paypal
// File: crates/hyperswitch_connectors/src/connectors/paypal.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::Refund for for Paypal


// Struct: PaypalAccessTokenErrorResponse
// File: crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct PaypalAccessTokenErrorResponse


// Function: get_config_directory
// File: crates/router_env/src/logger/config.rs
// Module: router_env

// Documentation: Read the env variable `CONFIG_DIR` or fallback to `config`

pub fn get_config_directory() -> PathBuf


// Implementation: impl std::ops::DerefMut for for PayoutsMandateReference
// File: crates/hyperswitch_domain_models/src/mandates.rs
// Module: hyperswitch_domain_models
// Methods: 1 total (0 public)

impl std::ops::DerefMut for for PayoutsMandateReference


// Function: revenue_recovery_resume_api
// File: crates/router/src/routes/process_tracker/revenue_recovery.rs
// Module: router

pub fn revenue_recovery_resume_api(
    state: web::Data<AppState>,
    req: HttpRequest,
    path: web::Path<common_utils::id_type::GlobalPaymentId>,
    json_payload: web::Json<revenue_recovery_api::RevenueRecoveryRetriggerRequest>,
) -> HttpResponse


// Struct: PayloadCurrencyAuthKeyType
// File: crates/connector_configs/src/connector.rs
// Module: connector_configs
// Implementations: 0

pub struct PayloadCurrencyAuthKeyType


// Function: derive_smithy_model
// File: crates/smithy/src/lib.rs
// Module: smithy

pub fn derive_smithy_model(input: TokenStream) -> TokenStream


// Struct: VoltRouterData
// File: crates/hyperswitch_connectors/src/connectors/volt/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct VoltRouterData<T>


// File: crates/common_utils/src/request.rs
// Module: common_utils
// Public functions: 19
// Public structs: 2

use masking::{Maskable, Secret};
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

pub type Headers = std::collections::HashSet<(String, Maskable<String>)>;

#[derive(
    Clone,
    Copy,
    Debug,
    Eq,
    PartialEq,
    Deserialize,
    Serialize,
    strum::Display,
    strum::EnumString,
    ToSchema,
)]
#[serde(rename_all = "UPPERCASE")]
#[strum(serialize_all = "UPPERCASE")]
pub enum Method {
    Get,
    Post,
    Put,
    Delete,
    Patch,
}

#[derive(Deserialize, Serialize, Debug)]
pub enum ContentType {
    Json,
    FormUrlEncoded,
    FormData,
    Xml,
}

fn default_request_headers() -> [(String, Maskable<String>); 1] {
    use http::header;

    [(header::VIA.to_string(), "HyperSwitch".to_string().into())]
}

#[derive(Debug)]
pub struct Request {
    pub url: String,
    pub headers: Headers,
    pub method: Method,
    pub certificate: Option<Secret<String>>,
    pub certificate_key: Option<Secret<String>>,
    pub body: Option<RequestContent>,
    pub ca_certificate: Option<Secret<String>>,
}

impl std::fmt::Debug for RequestContent {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(match self {
            Self::Json(_) => "JsonRequestBody",
            Self::FormUrlEncoded(_) => "FormUrlEncodedRequestBody",
            Self::FormData(_) => "FormDataRequestBody",
            Self::Xml(_) => "XmlRequestBody",
            Self::RawBytes(_) => "RawBytesRequestBody",
        })
    }
}

pub enum RequestContent {
    Json(Box<dyn masking::ErasedMaskSerialize + Send>),
    FormUrlEncoded(Box<dyn masking::ErasedMaskSerialize + Send>),
    FormData(reqwest::multipart::Form),
    Xml(Box<dyn masking::ErasedMaskSerialize + Send>),
    RawBytes(Vec<u8>),
}

impl RequestContent {
    pub fn get_inner_value(&self) -> Secret<String> {
        match self {
            Self::Json(i) => serde_json::to_string(&i).unwrap_or_default().into(),
            Self::FormUrlEncoded(i) => serde_urlencoded::to_string(i).unwrap_or_default().into(),
            Self::Xml(i) => quick_xml::se::to_string(&i).unwrap_or_default().into(),
            Self::FormData(_) => String::new().into(),
            Self::RawBytes(_) => String::new().into(),
        }
    }
}

impl Request {
    pub fn new(method: Method, url: &str) -> Self {
        Self {
            method,
            url: String::from(url),
            headers: std::collections::HashSet::new(),
            certificate: None,
            certificate_key: None,
            body: None,
            ca_certificate: None,
        }
    }

    pub fn set_body<T: Into<RequestContent>>(&mut self, body: T) {
        self.body.replace(body.into());
    }

    pub fn add_default_headers(&mut self) {
        self.headers.extend(default_request_headers());
    }

    pub fn add_header(&mut self, header: &str, value: Maskable<String>) {
        self.headers.insert((String::from(header), value));
    }

    pub fn add_certificate(&mut self, certificate: Option<Secret<String>>) {
        self.certificate = certificate;
    }

    pub fn add_certificate_key(&mut self, certificate_key: Option<Secret<String>>) {
        self.certificate = certificate_key;
    }
}

#[derive(Debug)]
pub struct RequestBuilder {
    pub url: String,
    pub headers: Headers,
    pub method: Method,
    pub certificate: Option<Secret<String>>,
    pub certificate_key: Option<Secret<String>>,
    pub body: Option<RequestContent>,
    pub ca_certificate: Option<Secret<String>>,
}

impl RequestBuilder {
    pub fn new() -> Self {
        Self {
            method: Method::Get,
            url: String::with_capacity(1024),
            headers: std::collections::HashSet::new(),
            certificate: None,
            certificate_key: None,
            body: None,
            ca_certificate: None,
        }
    }

    pub fn url(mut self, url: &str) -> Self {
        self.url = url.into();
        self
    }

    pub fn method(mut self, method: Method) -> Self {
        self.method = method;
        self
    }

    pub fn attach_default_headers(mut self) -> Self {
        self.headers.extend(default_request_headers());
        self
    }

    pub fn header(mut self, header: &str, value: &str) -> Self {
        self.headers.insert((header.into(), value.into()));
        self
    }

    pub fn headers(mut self, headers: Vec<(String, Maskable<String>)>) -> Self {
        self.headers.extend(headers);
        self
    }

    pub fn set_optional_body<T: Into<RequestContent>>(mut self, body: Option<T>) -> Self {
        body.map(|body| self.body.replace(body.into()));
        self
    }

    pub fn set_body<T: Into<RequestContent>>(mut self, body: T) -> Self {
        self.body.replace(body.into());
        self
    }

    pub fn add_certificate(mut self, certificate: Option<Secret<String>>) -> Self {
        self.certificate = certificate;
        self
    }

    pub fn add_certificate_key(mut self, certificate_key: Option<Secret<String>>) -> Self {
        self.certificate_key = certificate_key;
        self
    }

    pub fn add_ca_certificate_pem(mut self, ca_certificate: Option<Secret<String>>) -> Self {
        self.ca_certificate = ca_certificate;
        self
    }

    pub fn build(self) -> Request {
        Request {
            method: self.method,
            url: self.url,
            headers: self.headers,
            certificate: self.certificate,
            certificate_key: self.certificate_key,
            body: self.body,
            ca_certificate: self.ca_certificate,
        }
    }
}

impl Default for RequestBuilder {
    fn default() -> Self {
        Self::new()
    }
}


// Struct: PayoutsMandateReferenceRecord
// File: crates/hyperswitch_domain_models/src/mandates.rs
// Module: hyperswitch_domain_models
// Implementations: 0

pub struct PayoutsMandateReferenceRecord


// Function: server
// File: crates/router/src/compatibility/stripe/app.rs
// Module: router

pub fn server(config: routes::AppState) -> Scope


// Implementation: impl api::Refund for for Iatapay
// File: crates/hyperswitch_connectors/src/connectors/iatapay.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::Refund for for Iatapay


// Struct: PayonePayoutFulfillRequest
// File: crates/hyperswitch_connectors/src/connectors/payone/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct PayonePayoutFulfillRequest


// Struct: CreateCustomerRequest
// File: crates/router/src/compatibility/stripe/customers/types.rs
// Module: router
// Implementations: 0

pub struct CreateCustomerRequest


// Implementation: impl ConnectorSpecifications for for Forte
// File: crates/hyperswitch_connectors/src/connectors/forte.rs
// Module: hyperswitch_connectors
// Methods: 3 total (0 public)

impl ConnectorSpecifications for for Forte


// Struct: OpenMsearchOutput
// File: crates/api_models/src/analytics/search.rs
// Module: api_models
// Implementations: 0

pub struct OpenMsearchOutput


// Implementation: impl ConnectorCommon for for Opennode
// File: crates/hyperswitch_connectors/src/connectors/opennode.rs
// Module: hyperswitch_connectors
// Methods: 6 total (0 public)

impl ConnectorCommon for for Opennode


// Struct: PowertranzAddressDetails
// File: crates/hyperswitch_connectors/src/connectors/powertranz/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct PowertranzAddressDetails


// Implementation: impl ForexMetric for for PaymentIntentMetrics
// File: crates/api_models/src/analytics/payment_intents.rs
// Module: api_models
// Methods: 1 total (0 public)

impl ForexMetric for for PaymentIntentMetrics


// Implementation: impl CommonMandateReference
// File: crates/diesel_models/src/payment_method.rs
// Module: diesel_models
// Methods: 2 total (2 public)

impl CommonMandateReference


// Struct: DynamicRoutingStatsNew
// File: crates/diesel_models/src/dynamic_routing_stats.rs
// Module: diesel_models
// Implementations: 0

pub struct DynamicRoutingStatsNew


// Implementation: impl DynamicRoutingAlgoAccessor for for SuccessBasedAlgorithm
// File: crates/api_models/src/routing.rs
// Module: api_models
// Methods: 2 total (0 public)

impl DynamicRoutingAlgoAccessor for for SuccessBasedAlgorithm


// Implementation: impl ConnectorCommon for for Payload
// File: crates/hyperswitch_connectors/src/connectors/payload.rs
// Module: hyperswitch_connectors
// Methods: 6 total (0 public)

impl ConnectorCommon for for Payload


// Implementation: impl Default for for Database
// File: crates/storage_impl/src/config.rs
// Module: storage_impl
// Methods: 1 total (0 public)

impl Default for for Database


// Implementation: impl Responder
// File: crates/router/src/analytics.rs
// Module: router
// Methods: 0 total (0 public)

impl Responder


// Function: get_connector_transaction_id_as_string
// File: crates/api_models/src/webhooks.rs
// Module: api_models

pub fn get_connector_transaction_id_as_string(
        self,
    ) -> Result<String, common_utils::errors::ValidationError>


// Function: payment_intents_retrieve_with_gateway_creds
// File: crates/router/src/compatibility/stripe/payment_intents.rs
// Module: router

pub fn payment_intents_retrieve_with_gateway_creds(
    state: web::Data<routes::AppState>,
    qs_config: web::Data<serde_qs::Config>,
    req: HttpRequest,
    form_payload: web::Bytes,
) -> HttpResponse


// Implementation: impl api::PaymentCapture for for Square
// File: crates/hyperswitch_connectors/src/connectors/square.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::PaymentCapture for for Square


// Function: create_organization
// File: crates/router/src/core/admin.rs
// Module: router

pub fn create_organization(
    state: SessionState,
    req: api::OrganizationCreateRequest,
) -> RouterResponse<api::OrganizationResponse>


// Function: update_by_merchant_id_payout_attempt_id
// File: crates/diesel_models/src/query/payout_attempt.rs
// Module: diesel_models

pub fn update_by_merchant_id_payout_attempt_id(
        conn: &PgPooledConn,
        merchant_id: &common_utils::id_type::MerchantId,
        payout_attempt_id: &str,
        payout: PayoutAttemptUpdate,
    ) -> StorageResult<Self>


// Function: new
// File: crates/hyperswitch_connectors/src/connectors/blackhawknetwork.rs
// Module: hyperswitch_connectors

pub fn new() -> &'static Self


// Implementation: impl FileUpload for for Worldpayvantiv
// File: crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs
// Module: hyperswitch_connectors
// Methods: 1 total (0 public)

impl FileUpload for for Worldpayvantiv


// File: crates/router/src/workflows/outgoing_webhook_retry.rs
// Module: router
// Public structs: 1

#[cfg(feature = "payouts")]
use api_models::payouts as payout_models;
use api_models::{
    enums::EventType,
    webhook_events::OutgoingWebhookRequestContent,
    webhooks::{OutgoingWebhook, OutgoingWebhookContent},
};
use common_utils::{
    consts::DEFAULT_LOCALE,
    ext_traits::{StringExt, ValueExt},
    id_type,
};
use diesel_models::process_tracker::business_status;
use error_stack::ResultExt;
use masking::PeekInterface;
use router_env::tracing::{self, instrument};
use scheduler::{
    consumer::{self, workflows::ProcessTrackerWorkflow},
    types::process_data,
    utils as scheduler_utils,
};

#[cfg(feature = "payouts")]
use crate::core::payouts;
use crate::{
    core::{
        payments,
        webhooks::{self as webhooks_core, types::OutgoingWebhookTrackingData},
    },
    db::StorageInterface,
    errors, logger,
    routes::{app::ReqState, SessionState},
    types::{domain, storage},
};

pub struct OutgoingWebhookRetryWorkflow;

#[async_trait::async_trait]
impl ProcessTrackerWorkflow<SessionState> for OutgoingWebhookRetryWorkflow {
    #[cfg(feature = "v1")]
    #[instrument(skip_all)]
    async fn execute_workflow<'a>(
        &'a self,
        state: &'a SessionState,
        process: storage::ProcessTracker,
    ) -> Result<(), errors::ProcessTrackerError> {
        let delivery_attempt = storage::enums::WebhookDeliveryAttempt::AutomaticRetry;
        let tracking_data: OutgoingWebhookTrackingData = process
            .tracking_data
            .clone()
            .parse_value("OutgoingWebhookTrackingData")?;

        let db = &*state.store;
        let key_manager_state = &state.into();
        let key_store = db
            .get_merchant_key_store_by_merchant_id(
                key_manager_state,
                &tracking_data.merchant_id,
                &db.get_master_key().to_vec().into(),
            )
            .await?;
        let business_profile = db
            .find_business_profile_by_profile_id(
                key_manager_state,
                &key_store,
                &tracking_data.business_profile_id,
            )
            .await?;

        let event_id = webhooks_core::utils::generate_event_id();
        let idempotent_event_id = webhooks_core::utils::get_idempotent_event_id(
            &tracking_data.primary_object_id,
            tracking_data.event_type,
            delivery_attempt,
        )
        .change_context(errors::ApiErrorResponse::WebhookProcessingFailure)
        .attach_printable("Failed to generate idempotent event ID")?;

        let initial_event = match &tracking_data.initial_attempt_id {
            Some(initial_attempt_id) => {
                db.find_event_by_merchant_id_event_id(
                    key_manager_state,
                    &business_profile.merchant_id,
                    initial_attempt_id,
                    &key_store,
                )
                .await?
            }
            // Tracking data inserted by old version of application, fetch event using old event ID
            // format
            None => {
                let old_event_id = format!(
                    "{}_{}",
                    tracking_data.primary_object_id, tracking_data.event_type
                );
                db.find_event_by_merchant_id_event_id(
                    key_manager_state,
                    &business_profile.merchant_id,
                    &old_event_id,
                    &key_store,
                )
                .await?
            }
        };

        let now = common_utils::date_time::now();
        let new_event = domain::Event {
            event_id,
            event_type: initial_event.event_type,
            event_class: initial_event.event_class,
            is_webhook_notified: false,
            primary_object_id: initial_event.primary_object_id,
            primary_object_type: initial_event.primary_object_type,
            created_at: now,
            merchant_id: Some(business_profile.merchant_id.clone()),
            business_profile_id: Some(business_profile.get_id().to_owned()),
            primary_object_created_at: initial_event.primary_object_created_at,
            idempotent_event_id: Some(idempotent_event_id),
            initial_attempt_id: Some(initial_event.event_id.clone()),
            request: initial_event.request,
            response: None,
            delivery_attempt: Some(delivery_attempt),
            metadata: initial_event.metadata,
            is_overall_delivery_successful: Some(false),
        };

        let event = db
            .insert_event(key_manager_state, new_event, &key_store)
            .await
            .inspect_err(|error| {
                logger::error!(?error, "Failed to insert event in events table");
            })?;

        match &event.request {
            Some(request) => {
                let request_content: OutgoingWebhookRequestContent = request
                    .get_inner()
                    .peek()
                    .parse_struct("OutgoingWebhookRequestContent")?;

                Box::pin(webhooks_core::trigger_webhook_and_raise_event(
                    state.clone(),
                    business_profile,
                    &key_store,
                    event,
                    request_content,
                    delivery_attempt,
                    None,
                    Some(process),
                ))
                .await;
            }

            // Event inserted by old version of application, fetch current information about
            // resource
            None => {
                let merchant_account = db
                    .find_merchant_account_by_merchant_id(
                        key_manager_state,
                        &tracking_data.merchant_id,
                        &key_store,
                    )
                    .await?;

                let merchant_context = domain::MerchantContext::NormalMerchant(Box::new(
                    domain::Context(merchant_account.clone(), key_store.clone()),
                ));
                // TODO: Add request state for the PT flows as well
                let (content, event_type) = Box::pin(get_outgoing_webhook_content_and_event_type(
                    state.clone(),
                    state.get_req_state(),
                    merchant_account.clone(),
                    key_store.clone(),
                    &tracking_data,
                ))
                .await?;

                match event_type {
                    // Resource status is same as the event type of the current event
                    Some(event_type) if event_type == tracking_data.event_type => {
                        let outgoing_webhook = OutgoingWebhook {
                            merchant_id: tracking_data.merchant_id.clone(),
                            event_id: event.event_id.clone(),
                            event_type,
                            content: content.clone(),
                            timestamp: event.created_at,
                        };

                        let request_content = webhooks_core::get_outgoing_webhook_request(
                            &merchant_context,
                            outgoing_webhook,
                            &business_profile,
                        )
                        .map_err(|error| {
                            logger::error!(
                                ?error,
                                "Failed to obtain outgoing webhook request content"
                            );
                            errors::ProcessTrackerError::EApiErrorResponse
                        })?;

                        Box::pin(webhooks_core::trigger_webhook_and_raise_event(
                            state.clone(),
                            business_profile,
                            &key_store,
                            event,
                            request_content,
                            delivery_attempt,
                            Some(content),
                            Some(process),
                        ))
                        .await;
                    }
                    // Resource status has changed since the event was created, finish task
                    _ => {
                        logger::warn!(
                            %event.event_id,
                            "The current status of the resource `{:?}` (event type: {:?}) and the status of \
                            the resource when the event was created (event type: {:?}) differ, finishing task",
                            tracking_data.primary_object_id,
                            event_type,
                            tracking_data.event_type
                        );
                        db.as_scheduler()
                            .finish_process_with_business_status(
                                process.clone(),
                                business_status::RESOURCE_STATUS_MISMATCH,
                            )
                            .await?;
                    }
                }
            }
        };

        Ok(())
    }
    #[cfg(feature = "v2")]
    async fn execute_workflow<'a>(
        &'a self,
        _state: &'a SessionState,
        _process: storage::ProcessTracker,
    ) -> Result<(), errors::ProcessTrackerError> {
        todo!()
    }

    #[instrument(skip_all)]
    async fn error_handler<'a>(
        &'a self,
        state: &'a SessionState,
        process: storage::ProcessTracker,
        error: errors::ProcessTrackerError,
    ) -> errors::CustomResult<(), errors::ProcessTrackerError> {
        consumer::consumer_error_handler(state.store.as_scheduler(), process, error).await
    }
}

/// Get the schedule time for the specified retry count.
///
/// The schedule time can be configured in configs with this key: `pt_mapping_outgoing_webhooks`.
///
/// ```json
/// {
///   "default_mapping": {
///     "start_after": 60,
///     "frequency": [300],
///     "count": [5]
///   },
///   "custom_merchant_mapping": {
///     "merchant_id1": {
///       "start_after": 30,
///       "frequency": [300],
///       "count": [2]
///     }
///   }
/// }
/// ```
///
/// This configuration value represents:
/// - `default_mapping.start_after`: The first retry attempt should happen after 60 seconds by
///   default.
/// - `default_mapping.frequency` and `count`: The next 5 retries should have an interval of 300
///   seconds between them by default.
/// - `custom_merchant_mapping.merchant_id1`: Merchant-specific retry configuration for merchant
///   with merchant ID `merchant_id1`.
#[cfg(feature = "v1")]
#[instrument(skip_all)]
pub(crate) async fn get_webhook_delivery_retry_schedule_time(
    db: &dyn StorageInterface,
    merchant_id: &id_type::MerchantId,
    retry_count: i32,
) -> Option<time::PrimitiveDateTime> {
    let key = "pt_mapping_outgoing_webhooks";

    let result = db
        .find_config_by_key(key)
        .await
        .map(|value| value.config)
        .and_then(|config| {
            config
                .parse_struct("OutgoingWebhookRetryProcessTrackerMapping")
                .change_context(errors::StorageError::DeserializationFailed)
        });
    let mapping = result.map_or_else(
        |error| {
            if error.current_context().is_db_not_found() {
                logger::debug!("Outgoing webhooks retry config `{key}` not found, ignoring");
            } else {
                logger::error!(
                    ?error,
                    "Failed to read outgoing webhooks retry config `{key}`"
                );
            }
            process_data::OutgoingWebhookRetryProcessTrackerMapping::default()
        },
        |mapping| {
            logger::debug!(?mapping, "Using custom outgoing webhooks retry config");
            mapping
        },
    );

    let time_delta = scheduler_utils::get_outgoing_webhook_retry_schedule_time(
        mapping,
        merchant_id,
        retry_count,
    );

    scheduler_utils::get_time_from_delta(time_delta)
}

/// Schedule the webhook delivery task for retry
#[cfg(feature = "v1")]
#[instrument(skip_all)]
pub(crate) async fn retry_webhook_delivery_task(
    db: &dyn StorageInterface,
    merchant_id: &id_type::MerchantId,
    process: storage::ProcessTracker,
) -> errors::CustomResult<(), errors::StorageError> {
    let schedule_time =
        get_webhook_delivery_retry_schedule_time(db, merchant_id, process.retry_count + 1).await;

    match schedule_time {
        Some(schedule_time) => {
            db.as_scheduler()
                .retry_process(process, schedule_time)
                .await
        }
        None => {
            db.as_scheduler()
                .finish_process_with_business_status(process, business_status::RETRIES_EXCEEDED)
                .await
        }
    }
}

#[cfg(feature = "v1")]
#[instrument(skip_all)]
async fn get_outgoing_webhook_content_and_event_type(
    state: SessionState,
    req_state: ReqState,
    merchant_account: domain::MerchantAccount,
    key_store: domain::MerchantKeyStore,
    tracking_data: &OutgoingWebhookTrackingData,
) -> Result<(OutgoingWebhookContent, Option<EventType>), errors::ProcessTrackerError> {
    use api_models::{
        disputes::DisputeRetrieveRequest,
        mandates::MandateId,
        payments::{PaymentIdType, PaymentsResponse, PaymentsRetrieveRequest},
        refunds::{RefundResponse, RefundsRetrieveRequest},
    };

    use crate::{
        core::{
            disputes::retrieve_dispute,
            mandate::get_mandate,
            payments::{payments_core, CallConnectorAction, PaymentStatus},
            refunds::refund_retrieve_core_with_refund_id,
        },
        services::{ApplicationResponse, AuthFlow},
        types::{api::PSync, transformers::ForeignFrom},
    };

    let merchant_context = domain::MerchantContext::NormalMerchant(Box::new(domain::Context(
        merchant_account.clone(),
        key_store.clone(),
    )));
    match tracking_data.event_class {
        diesel_models::enums::EventClass::Payments => {
            let payment_id = tracking_data.primary_object_id.clone();
            let payment_id = id_type::PaymentId::try_from(std::borrow::Cow::Owned(payment_id))
                .map_err(|payment_id_parsing_error| {
                    logger::error!(
                        ?payment_id_parsing_error,
                        "Failed to parse payment ID from tracking data"
                    );
                    errors::ProcessTrackerError::DeserializationFailed
                })?;
            let request = PaymentsRetrieveRequest {
                resource_id: PaymentIdType::PaymentIntentId(payment_id),
                merchant_id: Some(tracking_data.merchant_id.clone()),
                force_sync: false,
                ..Default::default()
            };

            let payments_response = match Box::pin(payments_core::<
                PSync,
                PaymentsResponse,
                _,
                _,
                _,
                payments::PaymentData<PSync>,
            >(
                state,
                req_state,
                merchant_context.clone(),
                None,
                PaymentStatus,
                request,
                AuthFlow::Client,
                CallConnectorAction::Avoid,
                None,
                hyperswitch_domain_models::payments::HeaderPayload::default(),
            ))
            .await?
            {
                ApplicationResponse::Json(payments_response)
                | ApplicationResponse::JsonWithHeaders((payments_response, _)) => {
                    Ok(payments_response)
                }
                ApplicationResponse::StatusOk
                | ApplicationResponse::TextPlain(_)
                | ApplicationResponse::JsonForRedirection(_)
                | ApplicationResponse::Form(_)
                | ApplicationResponse::GenericLinkForm(_)
                | ApplicationResponse::PaymentLinkForm(_)
                | ApplicationResponse::FileData(_) => {
                    Err(errors::ProcessTrackerError::ResourceFetchingFailed {
                        resource_name: tracking_data.primary_object_id.clone(),
                    })
                }
            }?;
            let event_type: Option<EventType> = payments_response.status.into();
            logger::debug!(current_resource_status=%payments_response.status);

            Ok((
                OutgoingWebhookContent::PaymentDetails(Box::new(payments_response)),
                event_type,
            ))
        }

        diesel_models::enums::EventClass::Refunds => {
            let refund_id = tracking_data.primary_object_id.clone();
            let request = RefundsRetrieveRequest {
                refund_id,
                force_sync: Some(false),
                merchant_connector_details: None,
            };

            let refund = Box::pin(refund_retrieve_core_with_refund_id(
                state,
                merchant_context.clone(),
                None,
                request,
            ))
            .await?;
            let event_type: Option<EventType> = refund.refund_status.into();
            logger::debug!(current_resource_status=%refund.refund_status);
            let refund_response = RefundResponse::foreign_from(refund);

            Ok((
                OutgoingWebhookContent::RefundDetails(Box::new(refund_response)),
                event_type,
            ))
        }

        diesel_models::enums::EventClass::Disputes => {
            let dispute_id = tracking_data.primary_object_id.clone();
            let request = DisputeRetrieveRequest {
                dispute_id,
                force_sync: None,
            };

            let dispute_response = match Box::pin(retrieve_dispute(
                state,
                merchant_context.clone(),
                None,
                request,
            ))
            .await?
            {
                ApplicationResponse::Json(dispute_response)
                | ApplicationResponse::JsonWithHeaders((dispute_response, _)) => {
                    Ok(dispute_response)
                }
                ApplicationResponse::StatusOk
                | ApplicationResponse::TextPlain(_)
                | ApplicationResponse::JsonForRedirection(_)
                | ApplicationResponse::Form(_)
                | ApplicationResponse::GenericLinkForm(_)
                | ApplicationResponse::PaymentLinkForm(_)
                | ApplicationResponse::FileData(_) => {
                    Err(errors::ProcessTrackerError::ResourceFetchingFailed {
                        resource_name: tracking_data.primary_object_id.clone(),
                    })
                }
            }
            .map(Box::new)?;
            let event_type = Some(EventType::from(dispute_response.dispute_status));
            logger::debug!(current_resource_status=%dispute_response.dispute_status);

            Ok((
                OutgoingWebhookContent::DisputeDetails(dispute_response),
                event_type,
            ))
        }

        diesel_models::enums::EventClass::Mandates => {
            let mandate_id = tracking_data.primary_object_id.clone();
            let request = MandateId { mandate_id };

            let mandate_response =
                match get_mandate(state, merchant_context.clone(), request).await? {
                    ApplicationResponse::Json(mandate_response)
                    | ApplicationResponse::JsonWithHeaders((mandate_response, _)) => {
                        Ok(mandate_response)
                    }
                    ApplicationResponse::StatusOk
                    | ApplicationResponse::TextPlain(_)
                    | ApplicationResponse::JsonForRedirection(_)
                    | ApplicationResponse::Form(_)
                    | ApplicationResponse::GenericLinkForm(_)
                    | ApplicationResponse::PaymentLinkForm(_)
                    | ApplicationResponse::FileData(_) => {
                        Err(errors::ProcessTrackerError::ResourceFetchingFailed {
                            resource_name: tracking_data.primary_object_id.clone(),
                        })
                    }
                }
                .map(Box::new)?;
            let event_type: Option<EventType> = mandate_response.status.into();
            logger::debug!(current_resource_status=%mandate_response.status);

            Ok((
                OutgoingWebhookContent::MandateDetails(mandate_response),
                event_type,
            ))
        }
        #[cfg(feature = "payouts")]
        diesel_models::enums::EventClass::Payouts => {
            let payout_id = tracking_data.primary_object_id.clone();
            let request = payout_models::PayoutRequest::PayoutActionRequest(
                payout_models::PayoutActionRequest {
                    payout_id: id_type::PayoutId::try_from(std::borrow::Cow::Owned(payout_id))?,
                },
            );

            let payout_data = Box::pin(payouts::make_payout_data(
                &state,
                &merchant_context,
                None,
                &request,
                DEFAULT_LOCALE,
            ))
            .await?;

            let payout_create_response =
                payouts::response_handler(&state, &merchant_context, &payout_data).await?;

            let event_type: Option<EventType> = payout_data.payout_attempt.status.into();
            logger::debug!(current_resource_status=%payout_data.payout_attempt.status);

            Ok((
                OutgoingWebhookContent::PayoutDetails(Box::new(payout_create_response)),
                event_type,
            ))
        }
    }
}


// File: crates/diesel_models/src/blocklist_lookup.rs
// Module: diesel_models
// Public structs: 2

use diesel::{Identifiable, Insertable, Queryable, Selectable};
use serde::{Deserialize, Serialize};

use crate::schema::blocklist_lookup;

#[derive(Default, Clone, Debug, Eq, Insertable, PartialEq, Serialize, Deserialize)]
#[diesel(table_name = blocklist_lookup)]
pub struct BlocklistLookupNew {
    pub merchant_id: common_utils::id_type::MerchantId,
    pub fingerprint: String,
}

#[derive(
    Default,
    Clone,
    Debug,
    Eq,
    PartialEq,
    Identifiable,
    Queryable,
    Selectable,
    Deserialize,
    Serialize,
)]
#[diesel(table_name = blocklist_lookup, primary_key(merchant_id, fingerprint), check_for_backend(diesel::pg::Pg))]
pub struct BlocklistLookup {
    pub merchant_id: common_utils::id_type::MerchantId,
    pub fingerprint: String,
}


// Struct: BamboraRefundRequest
// File: crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct BamboraRefundRequest


// Function: generate_jwt
// File: crates/router/src/types/domain/user/decision_manager.rs
// Module: router

pub fn generate_jwt(
        self,
        state: &SessionState,
        next_flow: &NextFlow,
        user_role: &UserRole,
    ) -> UserResult<Secret<String>>


// Function: get_payment_filter_for_dimension
// File: crates/analytics/src/payments/filters.rs
// Module: analytics

pub fn get_payment_filter_for_dimension<T>(
    dimension: PaymentDimensions,
    auth: &AuthInfo,
    time_range: &TimeRange,
    pool: &T,
) -> FiltersResult<Vec<PaymentFilterRow>>
where
    T: AnalyticsDataSource + PaymentFilterAnalytics,
    PrimitiveDateTime: ToSql<T>,
    AnalyticsCollection: ToSql<T>,
    Granularity: GroupByClause<T>,
    Aggregate<&'static str>: ToSql<T>,
    Window<&'static str>: ToSql<T>,


// Function: verify_recon_token
// File: crates/router/src/core/recon.rs
// Module: router

pub fn verify_recon_token(
    state: SessionState,
    user_with_role: authentication::UserFromTokenWithRoleInfo,
) -> UserResponse<recon_api::VerifyTokenResponse>


// Struct: ListInvitationForUserResponse
// File: crates/api_models/src/user_role.rs
// Module: api_models
// Implementations: 0

pub struct ListInvitationForUserResponse


// Struct: ReferencesResponse
// File: crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct ReferencesResponse


// Function: proxy_for_payments_operation_core
// File: crates/router/src/core/payments.rs
// Module: router

pub fn proxy_for_payments_operation_core<F, Req, Op, FData, D>(
    state: &SessionState,
    req_state: ReqState,
    merchant_context: domain::MerchantContext,
    profile: domain::Profile,
    operation: Op,
    req: Req,
    get_tracker_response: operations::GetTrackerResponse<D>,
    call_connector_action: CallConnectorAction,
    header_payload: HeaderPayload,
    return_raw_connector_response: Option<bool>,
) -> RouterResult<(D, Req, Option<u16>, Option<u128>)>
where
    F: Send + Clone + Sync,
    Req: Send + Sync + Authenticate,
    Op: Operation<F, Req, Data = D> + Send + Sync,
    D: OperationSessionGetters<F> + OperationSessionSetters<F> + Send + Sync + Clone,

    // To create connector flow specific interface data
    D: ConstructFlowSpecificData<F, FData, router_types::PaymentsResponseData>,
    RouterData<F, FData, router_types::PaymentsResponseData>: Feature<F, FData>,

    // To construct connector flow specific api
    dyn api::Connector:
        services::api::ConnectorIntegration<F, FData, router_types::PaymentsResponseData>,

    RouterData<F, FData, router_types::PaymentsResponseData>:
        hyperswitch_domain_models::router_data::TrackerPostUpdateObjects<F, FData, D>,

    // To perform router related operation for PaymentResponse
    PaymentResponse: Operation<F, FData, Data = D>,
    FData: Send + Sync + Clone,


// Function: refund_filter_list
// File: crates/router/src/core/refunds.rs
// Module: router

pub fn refund_filter_list(
    state: SessionState,
    merchant_context: domain::MerchantContext,
    req: common_utils::types::TimeRange,
) -> RouterResponse<api_models::refunds::RefundListMetaData>


// Struct: HyperswitchVaultCustomerCreateResponse
// File: crates/hyperswitch_connectors/src/connectors/hyperswitch_vault/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct HyperswitchVaultCustomerCreateResponse


// Struct: CycleCheck
// File: crates/hyperswitch_constraint_graph/src/types.rs
// Module: hyperswitch_constraint_graph
// Implementations: 4
// Traits: Default, Deref, DerefMut

pub struct CycleCheck


            specific_features: None,
        },
    );

    adyen_supported_payment_methods.add(
        enums::PaymentMethod::GiftCard,
        PaymentMethodType::Givex,
        PaymentMethodDetails {
            mandates: enums::FeatureStatus::NotSupported,
            refunds: enums::FeatureStatus::Supported,
            supported_capture_methods: supported_capture_methods2.clone(),
            specific_features: None,
        },
    );

    adyen_supported_payment_methods
});

static ADYEN_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
        display_name: "Adyen",
        description: "Adyen is a Dutch payment company with the status of an acquiring bank that allows businesses to accept e-commerce, mobile, and point-of-sale payments. It is listed on the stock exchange Euronext Amsterdam",
        connector_type: enums::HyperswitchConnectorCategory::PaymentGateway,
        integration_status: enums::ConnectorIntegrationStatus::Live,
    };

static ADYEN_SUPPORTED_WEBHOOK_FLOWS: &[enums::EventClass] = &[
    enums::EventClass::Payments,
    enums::EventClass::Refunds,
    enums::EventClass::Disputes,
    #[cfg(feature = "payouts")]
    enums::EventClass::Payouts,
    enums::EventClass::Mandates,
];

impl ConnectorSpecifications for Adyen {
    fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
        Some(&ADYEN_CONNECTOR_INFO)
    }

    fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
        Some(&*ADYEN_SUPPORTED_PAYMENT_METHODS)
    }

    fn get_supported_webhook_flows(&self) -> Option<&'static [enums::EventClass]> {
        Some(ADYEN_SUPPORTED_WEBHOOK_FLOWS)
    }
}


// Function: get_filters_for_payments
// File: crates/diesel_models/src/query/payment_attempt.rs
// Module: diesel_models

pub fn get_filters_for_payments(
        conn: &PgPooledConn,
        pi: &[PaymentIntent],
        merchant_id: &common_utils::id_type::MerchantId,
    ) -> StorageResult<(
        Vec<String>,
        Vec<enums::Currency>,
        Vec<IntentStatus>,
        Vec<enums::PaymentMethod>,
        Vec<enums::PaymentMethodType>,
        Vec<enums::AuthenticationType>,
    )>


// Function: payouts_fulfill_core
// File: crates/router/src/core/payouts.rs
// Module: router

pub fn payouts_fulfill_core(
    state: SessionState,
    merchant_context: domain::MerchantContext,
    req: payouts::PayoutActionRequest,
) -> RouterResponse<payouts::PayoutCreateResponse>


// Struct: RevenueRecoveryData
// File: crates/hyperswitch_domain_models/src/payments.rs
// Module: hyperswitch_domain_models
// Implementations: 0

pub struct RevenueRecoveryData


// Implementation: impl PaymentSync for for Worldline
// File: crates/hyperswitch_connectors/src/connectors/worldline.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl PaymentSync for for Worldline


// Implementation: impl api::PaymentAuthorize for for Opayo
// File: crates/hyperswitch_connectors/src/connectors/opayo.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::PaymentAuthorize for for Opayo


// Struct: ThreeDsDecisionRuleExecuteResponse
// File: crates/api_models/src/three_ds_decision_rule.rs
// Module: api_models
// Implementations: 1
// Traits: common_utils::events::ApiEventMetric

pub struct ThreeDsDecisionRuleExecuteResponse


// Implementation: impl ConnectorValidation for for Fiservemea
// File: crates/hyperswitch_connectors/src/connectors/fiservemea.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl ConnectorValidation for for Fiservemea


// Struct: HelcimVerifyRequest
// File: crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct HelcimVerifyRequest


// Function: merchant_account_list
// File: crates/router/src/routes/admin.rs
// Module: router

pub fn merchant_account_list(
    state: web::Data<AppState>,
    req: HttpRequest,
    query_params: web::Query<api_models::admin::MerchantAccountListRequest>,
) -> HttpResponse


// Implementation: impl Capture
// File: crates/diesel_models/src/query/capture.rs
// Module: diesel_models
// Methods: 3 total (0 public)

impl Capture


// Function: get_payment_update_enabled_for_client_auth_key
// File: crates/common_utils/src/id_type/merchant.rs
// Module: common_utils

// Documentation: allow payment update via client auth default should be false

pub fn get_payment_update_enabled_for_client_auth_key(&self) -> String


// Function: get_filter_type_clause
// File: crates/analytics/src/query.rs
// Module: analytics

pub fn get_filter_type_clause(&self) -> Option<String>


// Function: get_authorization_info_with_groups
// File: crates/router/src/core/user_role.rs
// Module: router

pub fn get_authorization_info_with_groups(
    _state: SessionState,
) -> UserResponse<user_role_api::AuthorizationInfoResponse>


// Implementation: impl common_utils::events::ApiEventMetric for for CardNetworkTokenizeResponse
// File: crates/api_models/src/payment_methods.rs
// Module: api_models
// Methods: 0 total (0 public)

impl common_utils::events::ApiEventMetric for for CardNetworkTokenizeResponse


// Function: new
// File: crates/hyperswitch_connectors/src/connectors/mifinity.rs
// Module: hyperswitch_connectors

pub fn new() -> &'static Self


// Struct: SdkEventMetricsBucketIdentifier
// File: crates/api_models/src/analytics/sdk_events.rs
// Module: api_models
// Implementations: 3
// Traits: Hash, PartialEq

pub struct SdkEventMetricsBucketIdentifier


// Implementation: impl SurchargeMetadata
// File: crates/router/src/core/payments/types.rs
// Module: router
// Methods: 10 total (8 public)

impl SurchargeMetadata


// Implementation: impl MerchantId
// File: crates/router/src/types/domain/user.rs
// Module: router
// Methods: 2 total (2 public)

impl MerchantId


// Struct: RefundResponse
// File: crates/hyperswitch_connectors/src/connectors/juspaythreedsserver/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct RefundResponse


        ))
    }
    fn handle_response(
        &self,
        data: &PaymentsIncrementalAuthorizationRouterData,
        event_builder: Option<&mut ConnectorEvent>,
        res: Response,
    ) -> CustomResult<
        RouterData<
            IncrementalAuthorization,
            PaymentsIncrementalAuthorizationData,
            PaymentsResponseData,
        >,
        errors::ConnectorError,
    > {
        let response: cybersource::CybersourcePaymentsIncrementalAuthorizationResponse = res
            .response
            .parse_struct("Cybersource PaymentResponse")
            .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
        event_builder.map(|i| i.set_response_body(&response));
        router_env::logger::info!(connector_response=?response);
        RouterData::try_from(ResponseRouterData {
            response,
            data: data.clone(),
            http_code: res.status_code,
        })
        .change_context(errors::ConnectorError::ResponseHandlingFailed)
    }
    fn get_error_response(
        &self,
        res: Response,
        event_builder: Option<&mut ConnectorEvent>,
    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
        self.build_error_response(res, event_builder)
    }
}

#[async_trait::async_trait]
impl webhooks::IncomingWebhook for Cybersource {
    fn get_webhook_object_reference_id(
        &self,
        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
    ) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
        Err(report!(errors::ConnectorError::WebhooksNotImplemented))
    }

    fn get_webhook_event_type(
        &self,
        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
    ) -> CustomResult<api_models::webhooks::IncomingWebhookEvent, errors::ConnectorError> {
        Ok(api_models::webhooks::IncomingWebhookEvent::EventNotSupported)
    }

    fn get_webhook_resource_object(
        &self,
        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
    ) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
        Err(report!(errors::ConnectorError::WebhooksNotImplemented))
    }
}

static CYBERSOURCE_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> =
    LazyLock::new(|| {
        let supported_capture_methods = vec![
            enums::CaptureMethod::Automatic,
            enums::CaptureMethod::Manual,
            enums::CaptureMethod::SequentialAutomatic,
        ];

        let supported_card_network = vec![
            common_enums::CardNetwork::Visa,
            common_enums::CardNetwork::Mastercard,
            common_enums::CardNetwork::AmericanExpress,
            common_enums::CardNetwork::JCB,
            common_enums::CardNetwork::DinersClub,
            common_enums::CardNetwork::Discover,
            common_enums::CardNetwork::Visa,
            common_enums::CardNetwork::CartesBancaires,
            common_enums::CardNetwork::UnionPay,
            common_enums::CardNetwork::Maestro,
        ];

        let mut cybersource_supported_payment_methods = SupportedPaymentMethods::new();

        cybersource_supported_payment_methods.add(
            enums::PaymentMethod::Card,
            enums::PaymentMethodType::Credit,
            PaymentMethodDetails {
                mandates: enums::FeatureStatus::Supported,
                refunds: enums::FeatureStatus::Supported,
                supported_capture_methods: supported_capture_methods.clone(),
                specific_features: Some(
                    api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({
                        api_models::feature_matrix::CardSpecificFeatures {
                            three_ds: common_enums::FeatureStatus::Supported,
                            no_three_ds: common_enums::FeatureStatus::Supported,
                            supported_card_networks: supported_card_network.clone(),
                        }
                    }),
                ),
            },
        );

        cybersource_supported_payment_methods.add(
            enums::PaymentMethod::Card,
            enums::PaymentMethodType::Debit,
            PaymentMethodDetails {
                mandates: enums::FeatureStatus::Supported,
                refunds: enums::FeatureStatus::Supported,
                supported_capture_methods: supported_capture_methods.clone(),
                specific_features: Some(
                    api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({
                        api_models::feature_matrix::CardSpecificFeatures {
                            three_ds: common_enums::FeatureStatus::Supported,
                            no_three_ds: common_enums::FeatureStatus::Supported,
                            supported_card_networks: supported_card_network.clone(),
                        }
                    }),
                ),
            },
        );

        cybersource_supported_payment_methods.add(
            enums::PaymentMethod::Wallet,
            enums::PaymentMethodType::ApplePay,
            PaymentMethodDetails {
                mandates: enums::FeatureStatus::Supported,
                refunds: enums::FeatureStatus::Supported,
                supported_capture_methods: supported_capture_methods.clone(),
                specific_features: None,
            },
        );

        cybersource_supported_payment_methods.add(
            enums::PaymentMethod::Wallet,
            enums::PaymentMethodType::GooglePay,
            PaymentMethodDetails {
                mandates: enums::FeatureStatus::Supported,
                refunds: enums::FeatureStatus::Supported,
                supported_capture_methods: supported_capture_methods.clone(),
                specific_features: None,
            },
        );

        cybersource_supported_payment_methods.add(
            enums::PaymentMethod::Wallet,
            enums::PaymentMethodType::Paze,
            PaymentMethodDetails {
                mandates: enums::FeatureStatus::Supported,
                refunds: enums::FeatureStatus::Supported,
                supported_capture_methods: supported_capture_methods.clone(),
                specific_features: None,
            },
        );

        cybersource_supported_payment_methods.add(
            enums::PaymentMethod::Wallet,
            enums::PaymentMethodType::SamsungPay,
            PaymentMethodDetails {
                mandates: enums::FeatureStatus::Supported,
                refunds: enums::FeatureStatus::Supported,
                supported_capture_methods: supported_capture_methods.clone(),
                specific_features: None,
            },
        );

        cybersource_supported_payment_methods
    });

static CYBERSOURCE_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
    display_name: "Cybersource",
    description: "Cybersource provides payments, fraud protection, integrations, and support to help businesses grow with a digital-first approach.",
    connector_type: enums::HyperswitchConnectorCategory::PaymentGateway,
    integration_status: enums::ConnectorIntegrationStatus::Live,
};

static CYBERSOURCE_SUPPORTED_WEBHOOK_FLOWS: [common_enums::EventClass; 0] = [];

impl ConnectorSpecifications for Cybersource {
    fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
        Some(&CYBERSOURCE_CONNECTOR_INFO)
    }

    fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
        Some(&*CYBERSOURCE_SUPPORTED_PAYMENT_METHODS)
    }

    fn get_supported_webhook_flows(&self) -> Option<&'static [enums::EventClass]> {
        Some(&CYBERSOURCE_SUPPORTED_WEBHOOK_FLOWS)
    }
}


// Function: send_request_to_key_service_for_merchant
// File: crates/router/src/core/encryption.rs
// Module: router

pub fn send_request_to_key_service_for_merchant(
    state: &SessionState,
    keys: Vec<MerchantKeyStore>,
) -> errors::CustomResult<usize, errors::ApiErrorResponse>


// Implementation: impl api::PaymentToken for for Bluesnap
// File: crates/hyperswitch_connectors/src/connectors/bluesnap.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::PaymentToken for for Bluesnap


// Struct: PazeWalletData
// File: crates/hyperswitch_domain_models/src/payment_method_data.rs
// Module: hyperswitch_domain_models
// Implementations: 0

pub struct PazeWalletData


// Struct: StripeSplitRefundRequest
// File: crates/common_types/src/refunds.rs
// Module: common_types
// Implementations: 0

// Documentation: Charge specific fields for controlling the revert of funds from either platform or connected account for Stripe. Check sub-fields for more details.

pub struct StripeSplitRefundRequest


// Struct: NovalnetRefundSyncResponse
// File: crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct NovalnetRefundSyncResponse


// Function: get_extended_card_info
// File: crates/router/src/core/payments.rs
// Module: router

pub fn get_extended_card_info(
    state: SessionState,
    merchant_id: id_type::MerchantId,
    payment_id: id_type::PaymentId,
) -> RouterResponse<payments_api::ExtendedCardInfoResponse>


// Implementation: impl super::behaviour::Conversion for for Relay
// File: crates/hyperswitch_domain_models/src/relay.rs
// Module: hyperswitch_domain_models
// Methods: 3 total (0 public)

impl super::behaviour::Conversion for for Relay


// Implementation: impl api::Payment for for Moneris
// File: crates/hyperswitch_connectors/src/connectors/moneris.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::Payment for for Moneris


// Implementation: impl common_utils::events::ApiEventMetric for for ProfileAcquirerCreate
// File: crates/api_models/src/profile_acquirer.rs
// Module: api_models
// Methods: 0 total (0 public)

impl common_utils::events::ApiEventMetric for for ProfileAcquirerCreate


// Function: remove_entry_from_blocklist
// File: crates/router/src/routes/blocklist.rs
// Module: router

pub fn remove_entry_from_blocklist(
    state: web::Data<AppState>,
    req: HttpRequest,
    json_payload: web::Json<api_blocklist::DeleteFromBlocklistRequest>,
) -> HttpResponse


// Struct: ProcessingInformation
// File: crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct ProcessingInformation


// Implementation: impl api::PaymentVoid for for Payme
// File: crates/hyperswitch_connectors/src/connectors/payme.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::PaymentVoid for for Payme


// Struct: ConnectorAuthTypeAndMetadataValidation
// File: crates/router/src/core/connector_validation.rs
// Module: router
// Implementations: 1

pub struct ConnectorAuthTypeAndMetadataValidation<'a>


// Implementation: impl api::PaymentAuthorize for for Worldline
// File: crates/hyperswitch_connectors/src/connectors/worldline.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::PaymentAuthorize for for Worldline


// Struct: WorldpayErrorResponse
// File: crates/hyperswitch_connectors/src/connectors/worldpay/response.rs
// Module: hyperswitch_connectors
// Implementations: 1

pub struct WorldpayErrorResponse


// Struct: DisputeFilterValue
// File: crates/api_models/src/analytics.rs
// Module: api_models
// Implementations: 0

pub struct DisputeFilterValue