refactor(core): introduce an interface to switch between old and new connector integration implementations on the connectors (#5013)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Files to modify:


**router_data_v2.rs**
  Modify existing code

**flow_common_types.rs**
  Modify existing code

**utils.rs**
  Modify existing code

**disputes.rs**
  Modify existing code

**helpers.rs**
  Modify existing code

**fraud_check.rs**
  Modify existing code

**checkout_flow.rs**
  Modify existing code

**record_return.rs**
  Modify existing code

**sale_flow.rs**
  Modify existing code

**transaction_flow.rs**
  Modify existing code

**mandate.rs**
  Modify existing code

**payments.rs**
  Modify existing code

**access_token.rs**
  Modify existing code

**customers.rs**
  Modify existing code

**authorize_flow.rs**
  Modify existing code

**cancel_flow.rs**
  Modify existing code

**capture_flow.rs**
  Modify existing code

**complete_authorize_flow.rs**
  Modify existing code

**incremental_authorization_flow.rs**
  Modify existing code

**psync_flow.rs**
  Modify existing code

**session_flow.rs**
  Modify existing code

**setup_mandate_flow.rs**
  Modify existing code

**tokenization.rs**
  Modify existing code

**transformers.rs**
  Modify existing code

**payouts.rs**
  Modify existing code

**access_token.rs**
  Modify existing code

**refunds.rs**
  Modify existing code

**verify_connector.rs**
  Modify existing code

**incoming.rs**
  Modify existing code

**services.rs**
  Remove:
    - mod: pub::email
  Add:
    - mod: pub::connector_integration_interface
    - mod: pub::conversion_impls
    - mod: pub::email

**api.rs**
  Modify existing code

**connector_integration_interface.rs**
  Add:
    - function: pub::get_connector_integration
    - function: pub::validate_file_upload
    - function: private::get_webhook_body_decoding_algorithm
    - function: private::get_webhook_body_decoding_merchant_secret
    - function: private::get_webhook_body_decoding_message
    - function: private::decode_webhook_body
    - function: private::get_webhook_source_verification_algorithm
    - function: private::get_webhook_source_verification_merchant_secret
    - function: private::get_webhook_source_verification_signature
    - function: private::get_webhook_source_verification_message
    - function: private::verify_webhook_source_verification_call
    - function: private::verify_webhook_source
    - function: private::get_webhook_object_reference_id
    - function: private::get_webhook_event_type
    - function: private::get_webhook_resource_object
    - function: private::get_webhook_api_response
    - function: private::get_dispute_details
    - function: private::get_external_authentication_details
    - function: private::connector_transaction_id
    - function: private::get_flow_type
    - function: private::validate_capture_method
    - function: private::validate_mandate_payment
    - function: private::validate_psync_reference_id
    - function: private::is_webhook_source_verification_mandatory
    - function: private::id
    - function: private::get_currency_unit
    - function: private::get_auth_header
    - function: private::common_get_content_type
    - function: private::base_url
    - function: private::build_error_response
    - function: private::id
    - function: private::get_currency_unit
    - function: private::get_auth_header
    - function: private::common_get_content_type
    - function: private::base_url
    - function: private::build_error_response
    - function: private::get_multiple_capture_sync_method
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_5xx_error_response
    - function: private::clone_box
    - enum: pub::ConnectorEnum
    - enum: pub::ConnectorIntegrationEnum
    - trait: pub::RouterDataConversion
    - trait: pub::ConnectorIntegrationInterface
    - impl: impl ConnectorEnum
    - impl: impl api::IncomingWebhook for ConnectorEnum
    - impl: impl api::ConnectorTransactionId for ConnectorEnum
    - impl: impl ConnectorRedirectResponse for ConnectorEnum
    - impl: impl ConnectorValidation for ConnectorEnum
    - impl: impl api::ConnectorCommon for ConnectorEnum
    - impl: impl api::ConnectorCommon for ConnectorIntegrationEnum<'_, T, ResourceCommonData, Req, Resp>
    - impl: impl ConnectorIntegrationInterface<T, ResourceCommonData, Req, Resp> for ConnectorIntegrationEnum<'static, T, ResourceCommonData, Req, Resp>

**conversion_impls.rs**
  Add:
    - function: private::get_irrelevant_id_string
    - function: private::get_default_router_data
    - function: private::from_old_router_data
    - function: private::to_old_router_data
    - function: private::from_old_router_data
    - function: private::to_old_router_data
    - function: private::from_old_router_data
    - function: private::to_old_router_data
    - function: private::from_old_router_data
    - function: private::to_old_router_data
    - function: private::from_old_router_data
    - function: private::to_old_router_data
    - function: private::from_old_router_data
    - function: private::to_old_router_data
    - function: private::from_old_router_data
    - function: private::to_old_router_data
    - function: private::from_old_router_data
    - function: private::to_old_router_data
    - function: private::from_old_router_data
    - function: private::to_old_router_data
    - function: private::from_old_router_data
    - function: private::to_old_router_data
    - impl: impl RouterDataConversion<T, Req, Resp> for AccessTokenFlowData
    - impl: impl RouterDataConversion<T, Req, Resp> for PaymentFlowData
    - impl: impl RouterDataConversion<T, Req, Resp> for RefundFlowData
    - impl: impl RouterDataConversion<T, Req, Resp> for DisputesFlowData
    - impl: impl RouterDataConversion<T, Req, Resp> for FrmFlowData
    - impl: impl RouterDataConversion<T, Req, Resp> for FilesFlowData
    - impl: impl RouterDataConversion<T, Req, Resp> for WebhookSourceVerifyData
    - impl: impl RouterDataConversion<T, Req, Resp> for MandateRevokeFlowData
    - impl: impl RouterDataConversion<T, Req, Resp> for PayoutFlowData
    - impl: impl RouterDataConversion<T, Req, Resp> for ExternalAuthenticationFlowData

**types.rs**
  Modify existing code

**api.rs**
  Modify existing code

**authentication.rs**
  Modify existing code

**fraud_check.rs**
  Modify existing code

**verify_connector.rs**
  Modify existing code

**paypal.rs**
  Modify existing code

**stripe.rs**
  Modify existing code

**webhooks.rs**
  Modify existing code

**paypal.rs**
  Modify existing code

**aci.rs**
  Modify existing code

**adyen.rs**
  Modify existing code

**airwallex.rs**
  Modify existing code

**authorizedotnet.rs**
  Modify existing code

**bambora.rs**
  Modify existing code

**bankofamerica.rs**
  Modify existing code

**billwerk.rs**
  Modify existing code

**bitpay.rs**
  Modify existing code

**bluesnap.rs**
  Modify existing code

**boku.rs**
  Modify existing code

**cashtocode.rs**
  Modify existing code

**checkout.rs**
  Modify existing code

**coinbase.rs**
  Modify existing code

**cryptopay.rs**
  Modify existing code

**cybersource.rs**
  Modify existing code

**datatrans.rs**
  Modify existing code

**dlocal.rs**
  Modify existing code

**dummyconnector.rs**
  Modify existing code

**ebanx.rs**
  Modify existing code

**fiserv.rs**
  Modify existing code

**forte.rs**
  Modify existing code

**globalpay.rs**
  Modify existing code

**globepay.rs**
  Modify existing code

**gocardless.rs**
  Modify existing code

**gpayments.rs**
  Modify existing code

**helcim.rs**
  Modify existing code

**iatapay.rs**
  Modify existing code

**mifinity.rs**
  Modify existing code

**mollie.rs**
  Modify existing code

**multisafepay.rs**
  Modify existing code

**netcetera.rs**
  Modify existing code

**nexinets.rs**
  Modify existing code

**nmi.rs**
  Modify existing code

**noon.rs**
  Modify existing code

**nuvei.rs**
  Modify existing code

**opayo.rs**
  Modify existing code

**opennode.rs**
  Modify existing code

**payeezy.rs**
  Modify existing code

**payme.rs**
  Modify existing code

**payone.rs**
  Modify existing code

**paypal.rs**
  Modify existing code

**payu.rs**
  Modify existing code

**placetopay.rs**
  Modify existing code

**powertranz.rs**
  Modify existing code

**prophetpay.rs**
  Modify existing code

**rapyd.rs**
  Modify existing code

**shift4.rs**
  Modify existing code

**square.rs**
  Modify existing code

**stax.rs**
  Modify existing code

**stripe.rs**
  Modify existing code

**trustpay.rs**
  Modify existing code

**tsys.rs**
  Modify existing code

**utils.rs**
  Modify existing code

**volt.rs**
  Modify existing code

**wise.rs**
  Modify existing code

**worldline.rs**
  Modify existing code

**worldpay.rs**
  Modify existing code

**zen.rs**
  Modify existing code

**zsl.rs**
  Modify existing code