// Struct: SyncResponseBody
// File: crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct SyncResponseBody


// Implementation: impl RefundExecute for for Wellsfargo
// File: crates/hyperswitch_connectors/src/connectors/wellsfargo.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl RefundExecute for for Wellsfargo


// Trait: NetworkTokenizationProcess
// File: crates/router/src/core/payment_methods/tokenize.rs
// Module: router

pub trait NetworkTokenizationProcess<'a, D>


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

pub struct BankOfAmericaPaymentInitiator


// Struct: CybersourceConsumerAuthInformationResponse
// File: crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct CybersourceConsumerAuthInformationResponse


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

impl Responder


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

impl ConnectorValidation for for Finix


// Function: relay_retrieve
// File: crates/router/src/routes/relay.rs
// Module: router

pub fn relay_retrieve(
    state: web::Data<app::AppState>,
    path: web::Path<common_utils::id_type::RelayId>,
    req: actix_web::HttpRequest,
    query_params: web::Query<api_models::relay::RelayRetrieveBody>,
) -> impl Responder


// Struct: DummyConnectorPaymentData
// File: crates/router/src/routes/dummy_connector/types.rs
// Module: router
// Implementations: 1

pub struct DummyConnectorPaymentData


// Struct: DisputedAmountAccumulator
// File: crates/analytics/src/disputes/accumulators.rs
// Module: analytics
// Implementations: 1
// Traits: DisputeMetricAccumulator

pub struct DisputedAmountAccumulator


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

pub fn refresh_routing_cache_v1(
    state: &SessionState,
    key: String,
    algorithm_id: &common_utils::id_type::RoutingId,
    profile_id: &common_utils::id_type::ProfileId,
) -> RoutingResult<Arc<CachedAlgorithm>>


// Function: is_three_decimal_currency
// File: crates/common_enums/src/enums.rs
// Module: common_enums

pub fn is_three_decimal_currency(self) -> bool


// Struct: Link
// File: crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct Link


// Function: new
// File: crates/hyperswitch_constraint_graph/src/types.rs
// Module: hyperswitch_constraint_graph

pub fn new() -> Self


// Implementation: impl api::PaymentSession for for Nmi
// File: crates/hyperswitch_connectors/src/connectors/nmi.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::PaymentSession for for Nmi


// Implementation: impl Payouts
// File: crates/router/src/routes/app.rs
// Module: router
// Methods: 1 total (1 public)

impl Payouts


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

impl IncomingWebhook for for Braintree


// Struct: SilverflowErrorResponse
// File: crates/hyperswitch_connectors/src/connectors/silverflow/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct SilverflowErrorResponse


// Struct: LineItem
// File: crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct LineItem


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

impl api::PaymentToken for for Adyenplatform


// Struct: PeachpaymentsConfirmResponse
// File: crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct PeachpaymentsConfirmResponse


// Struct: CybersourceStandardErrorResponse
// File: crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct CybersourceStandardErrorResponse


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

pub struct CardVaultResponse


// Function: get_org_payment_metrics
// File: crates/router/src/analytics.rs
// Module: router

// Documentation: Panics if `json_payload` array does not contain one `GetPaymentMetricRequest` element.

pub fn get_org_payment_metrics(
        state: web::Data<AppState>,
        req: actix_web::HttpRequest,
        json_payload: web::Json<[GetPaymentMetricRequest; 1]>,
    ) -> impl Responder


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

pub struct GiftCardBalanceCheck


// Trait: RedisConnInterface
// File: crates/storage_impl/src/redis/kv_store.rs
// Module: storage_impl

pub trait RedisConnInterface


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

impl api::PaymentSync for for Multisafepay


// Implementation: impl AuthEventMetricsBucketIdentifier
// File: crates/api_models/src/analytics/auth_events.rs
// Module: api_models
// Methods: 1 total (1 public)

impl AuthEventMetricsBucketIdentifier


// Struct: Helcim
// File: crates/hyperswitch_connectors/src/connectors/helcim.rs
// Module: hyperswitch_connectors
// Implementations: 19
// Traits: api::Payment, api::PaymentSession, api::ConnectorAccessToken, api::MandateSetup, api::PaymentAuthorize, api::PaymentSync, api::PaymentCapture, api::PaymentVoid, api::Refund, api::RefundExecute, api::RefundSync, api::PaymentToken, ConnectorCommon, ConnectorValidation, IncomingWebhook, ConnectorSpecifications, ConnectorTransactionId

pub struct Helcim

api::Payment api::PaymentSession api::ConnectorAccessToken api::MandateSetup api::PaymentAuthorize api::PaymentSync api::PaymentCapture api::PaymentVoid api::Refund api::RefundExecute api::RefundSync api::PaymentToken ConnectorCommon ConnectorValidation IncomingWebhook ConnectorSpecifications ConnectorTransactionId


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

impl api::PaymentVoid for for Paybox


// File: crates/payment_methods/src/helpers.rs
// Module: payment_methods
// Public functions: 3

use api_models::{enums as api_enums, payment_methods as api};
#[cfg(feature = "v1")]
use common_utils::ext_traits::AsyncExt;
pub use hyperswitch_domain_models::{errors::api_error_response, payment_methods as domain};
#[cfg(feature = "v1")]
use router_env::logger;

use crate::state;
#[cfg(feature = "v1")]
pub async fn populate_bin_details_for_payment_method_create(
    card_details: api_models::payment_methods::CardDetail,
    db: Box<dyn state::PaymentMethodsStorageInterface>,
) -> api_models::payment_methods::CardDetail {
    let card_isin: Option<_> = Some(card_details.card_number.get_card_isin());
    if card_details.card_issuer.is_some()
        && card_details.card_network.is_some()
        && card_details.card_type.is_some()
        && card_details.card_issuing_country.is_some()
    {
        api::CardDetail {
            card_issuer: card_details.card_issuer.to_owned(),
            card_network: card_details.card_network.clone(),
            card_type: card_details.card_type.to_owned(),
            card_issuing_country: card_details.card_issuing_country.to_owned(),
            card_exp_month: card_details.card_exp_month.clone(),
            card_exp_year: card_details.card_exp_year.clone(),
            card_holder_name: card_details.card_holder_name.clone(),
            card_number: card_details.card_number.clone(),
            nick_name: card_details.nick_name.clone(),
        }
    } else {
        let card_info = card_isin
            .clone()
            .async_and_then(|card_isin| async move {
                db.get_card_info(&card_isin)
                    .await
                    .map_err(|error| logger::error!(card_info_error=?error))
                    .ok()
            })
            .await
            .flatten()
            .map(|card_info| api::CardDetail {
                card_issuer: card_info.card_issuer,
                card_network: card_info.card_network.clone(),
                card_type: card_info.card_type,
                card_issuing_country: card_info.card_issuing_country,
                card_exp_month: card_details.card_exp_month.clone(),
                card_exp_year: card_details.card_exp_year.clone(),
                card_holder_name: card_details.card_holder_name.clone(),
                card_number: card_details.card_number.clone(),
                nick_name: card_details.nick_name.clone(),
            });
        card_info.unwrap_or_else(|| api::CardDetail {
            card_issuer: None,
            card_network: None,
            card_type: None,
            card_issuing_country: None,
            card_exp_month: card_details.card_exp_month.clone(),
            card_exp_year: card_details.card_exp_year.clone(),
            card_holder_name: card_details.card_holder_name.clone(),
            card_number: card_details.card_number.clone(),
            nick_name: card_details.nick_name.clone(),
        })
    }
}

#[cfg(feature = "v2")]
pub async fn populate_bin_details_for_payment_method_create(
    _card_details: api_models::payment_methods::CardDetail,
    _db: &dyn state::PaymentMethodsStorageInterface,
) -> api_models::payment_methods::CardDetail {
    todo!()
}

pub fn validate_payment_method_type_against_payment_method(
    payment_method: api_enums::PaymentMethod,
    payment_method_type: api_enums::PaymentMethodType,
) -> bool {
    match payment_method {
        #[cfg(feature = "v1")]
        api_enums::PaymentMethod::Card => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::Credit | api_enums::PaymentMethodType::Debit
        ),
        #[cfg(feature = "v2")]
        api_enums::PaymentMethod::Card => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::Credit
                | api_enums::PaymentMethodType::Debit
                | api_enums::PaymentMethodType::Card
        ),
        api_enums::PaymentMethod::PayLater => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::Affirm
                | api_enums::PaymentMethodType::Alma
                | api_enums::PaymentMethodType::AfterpayClearpay
                | api_enums::PaymentMethodType::Klarna
                | api_enums::PaymentMethodType::PayBright
                | api_enums::PaymentMethodType::Atome
                | api_enums::PaymentMethodType::Walley
                | api_enums::PaymentMethodType::Breadpay
                | api_enums::PaymentMethodType::Flexiti
        ),
        api_enums::PaymentMethod::Wallet => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::AmazonPay
                | api_enums::PaymentMethodType::Bluecode
                | api_enums::PaymentMethodType::Paysera
                | api_enums::PaymentMethodType::Skrill
                | api_enums::PaymentMethodType::ApplePay
                | api_enums::PaymentMethodType::GooglePay
                | api_enums::PaymentMethodType::Paypal
                | api_enums::PaymentMethodType::AliPay
                | api_enums::PaymentMethodType::AliPayHk
                | api_enums::PaymentMethodType::Dana
                | api_enums::PaymentMethodType::MbWay
                | api_enums::PaymentMethodType::MobilePay
                | api_enums::PaymentMethodType::SamsungPay
                | api_enums::PaymentMethodType::Twint
                | api_enums::PaymentMethodType::Vipps
                | api_enums::PaymentMethodType::TouchNGo
                | api_enums::PaymentMethodType::Swish
                | api_enums::PaymentMethodType::WeChatPay
                | api_enums::PaymentMethodType::GoPay
                | api_enums::PaymentMethodType::Gcash
                | api_enums::PaymentMethodType::Momo
                | api_enums::PaymentMethodType::KakaoPay
                | api_enums::PaymentMethodType::Cashapp
                | api_enums::PaymentMethodType::Mifinity
                | api_enums::PaymentMethodType::Paze
                | api_enums::PaymentMethodType::RevolutPay
        ),
        api_enums::PaymentMethod::BankRedirect => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::Giropay
                | api_enums::PaymentMethodType::Ideal
                | api_enums::PaymentMethodType::Sofort
                | api_enums::PaymentMethodType::Eft
                | api_enums::PaymentMethodType::Eps
                | api_enums::PaymentMethodType::BancontactCard
                | api_enums::PaymentMethodType::Blik
                | api_enums::PaymentMethodType::LocalBankRedirect
                | api_enums::PaymentMethodType::OnlineBankingThailand
                | api_enums::PaymentMethodType::OnlineBankingCzechRepublic
                | api_enums::PaymentMethodType::OnlineBankingFinland
                | api_enums::PaymentMethodType::OnlineBankingFpx
                | api_enums::PaymentMethodType::OnlineBankingPoland
                | api_enums::PaymentMethodType::OnlineBankingSlovakia
                | api_enums::PaymentMethodType::Przelewy24
                | api_enums::PaymentMethodType::Trustly
                | api_enums::PaymentMethodType::Bizum
                | api_enums::PaymentMethodType::Interac
                | api_enums::PaymentMethodType::OpenBankingUk
                | api_enums::PaymentMethodType::OpenBankingPIS
        ),
        api_enums::PaymentMethod::BankTransfer => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::Ach
                | api_enums::PaymentMethodType::SepaBankTransfer
                | api_enums::PaymentMethodType::Bacs
                | api_enums::PaymentMethodType::Multibanco
                | api_enums::PaymentMethodType::Pix
                | api_enums::PaymentMethodType::Pse
                | api_enums::PaymentMethodType::PermataBankTransfer
                | api_enums::PaymentMethodType::BcaBankTransfer
                | api_enums::PaymentMethodType::BniVa
                | api_enums::PaymentMethodType::BriVa
                | api_enums::PaymentMethodType::CimbVa
                | api_enums::PaymentMethodType::DanamonVa
                | api_enums::PaymentMethodType::MandiriVa
                | api_enums::PaymentMethodType::LocalBankTransfer
                | api_enums::PaymentMethodType::InstantBankTransfer
                | api_enums::PaymentMethodType::InstantBankTransferFinland
                | api_enums::PaymentMethodType::InstantBankTransferPoland
                | api_enums::PaymentMethodType::IndonesianBankTransfer
        ),
        api_enums::PaymentMethod::BankDebit => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::Ach
                | api_enums::PaymentMethodType::Sepa
                | api_enums::PaymentMethodType::Bacs
                | api_enums::PaymentMethodType::Becs
        ),
        api_enums::PaymentMethod::Crypto => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::CryptoCurrency
        ),
        api_enums::PaymentMethod::Reward => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::Evoucher | api_enums::PaymentMethodType::ClassicReward
        ),
        api_enums::PaymentMethod::RealTimePayment => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::Fps
                | api_enums::PaymentMethodType::DuitNow
                | api_enums::PaymentMethodType::PromptPay
                | api_enums::PaymentMethodType::VietQr
        ),
        api_enums::PaymentMethod::Upi => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::UpiCollect | api_enums::PaymentMethodType::UpiIntent
        ),
        api_enums::PaymentMethod::Voucher => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::Boleto
                | api_enums::PaymentMethodType::Efecty
                | api_enums::PaymentMethodType::PagoEfectivo
                | api_enums::PaymentMethodType::RedCompra
                | api_enums::PaymentMethodType::RedPagos
                | api_enums::PaymentMethodType::Indomaret
                | api_enums::PaymentMethodType::Alfamart
                | api_enums::PaymentMethodType::Oxxo
                | api_enums::PaymentMethodType::SevenEleven
                | api_enums::PaymentMethodType::Lawson
                | api_enums::PaymentMethodType::MiniStop
                | api_enums::PaymentMethodType::FamilyMart
                | api_enums::PaymentMethodType::Seicomart
                | api_enums::PaymentMethodType::PayEasy
        ),
        api_enums::PaymentMethod::GiftCard => {
            matches!(
                payment_method_type,
                api_enums::PaymentMethodType::Givex | api_enums::PaymentMethodType::PaySafeCard
            )
        }
        api_enums::PaymentMethod::CardRedirect => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::Knet
                | api_enums::PaymentMethodType::Benefit
                | api_enums::PaymentMethodType::MomoAtm
                | api_enums::PaymentMethodType::CardRedirect
        ),
        api_enums::PaymentMethod::OpenBanking => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::OpenBankingPIS
        ),
        api_enums::PaymentMethod::MobilePayment => matches!(
            payment_method_type,
            api_enums::PaymentMethodType::DirectCarrierBilling
        ),
    }
}

pub trait ForeignFrom<F> {
    fn foreign_from(from: F) -> Self;
}

/// Trait for converting from one foreign type to another
pub trait ForeignTryFrom<F>: Sized {
    /// Custom error for conversion failure
    type Error;
    /// Convert from a foreign type to the current type and return an error if the conversion fails
    fn foreign_try_from(from: F) -> Result<Self, Self::Error>;
}

#[cfg(feature = "v1")]
impl ForeignFrom<(Option<api::CardDetailFromLocker>, domain::PaymentMethod)>
    for api::PaymentMethodResponse
{
    fn foreign_from(
        (card_details, item): (Option<api::CardDetailFromLocker>, domain::PaymentMethod),
    ) -> Self {
        Self {
            merchant_id: item.merchant_id.to_owned(),
            customer_id: Some(item.customer_id.to_owned()),
            payment_method_id: item.get_id().clone(),
            payment_method: item.get_payment_method_type(),
            payment_method_type: item.get_payment_method_subtype(),
            card: card_details,
            recurring_enabled: Some(false),
            installment_payment_enabled: Some(false),
            payment_experience: None,
            metadata: item.metadata,
            created: Some(item.created_at),
            #[cfg(feature = "payouts")]
            bank_transfer: None,
            last_used_at: None,
            client_secret: item.client_secret,
        }
    }
}

#[cfg(feature = "v2")]
impl ForeignFrom<(Option<api::CardDetailFromLocker>, domain::PaymentMethod)>
    for api::PaymentMethodResponse
{
    fn foreign_from(
        (_card_details, _item): (Option<api::CardDetailFromLocker>, domain::PaymentMethod),
    ) -> Self {
        todo!()
    }
}

pub trait StorageErrorExt<T, E> {
    #[track_caller]
    fn to_not_found_response(self, not_found_response: E) -> error_stack::Result<T, E>;

    #[track_caller]
    fn to_duplicate_response(self, duplicate_response: E) -> error_stack::Result<T, E>;
}

impl<T> StorageErrorExt<T, api_error_response::ApiErrorResponse>
    for error_stack::Result<T, storage_impl::StorageError>
{
    #[track_caller]
    fn to_not_found_response(
        self,
        not_found_response: api_error_response::ApiErrorResponse,
    ) -> error_stack::Result<T, api_error_response::ApiErrorResponse> {
        self.map_err(|err| {
            let new_err = match err.current_context() {
                storage_impl::StorageError::ValueNotFound(_) => not_found_response,
                storage_impl::StorageError::CustomerRedacted => {
                    api_error_response::ApiErrorResponse::CustomerRedacted
                }
                _ => api_error_response::ApiErrorResponse::InternalServerError,
            };
            err.change_context(new_err)
        })
    }

    #[track_caller]
    fn to_duplicate_response(
        self,
        duplicate_response: api_error_response::ApiErrorResponse,
    ) -> error_stack::Result<T, api_error_response::ApiErrorResponse> {
        self.map_err(|err| {
            let new_err = match err.current_context() {
                storage_impl::StorageError::DuplicateValue { .. } => duplicate_response,
                _ => api_error_response::ApiErrorResponse::InternalServerError,
            };
            err.change_context(new_err)
        })
    }
}


// Function: org_id
// File: crates/common_utils/src/types/user/theme.rs
// Module: common_utils

// Documentation: Get the org_id from the lineage

pub fn org_id(&self) -> Option<&id_type::OrganizationId>


// Struct: SupportedPaymentMethodTypesForMandate
// File: crates/payment_methods/src/configs/settings.rs
// Module: payment_methods
// Implementations: 0

pub struct SupportedPaymentMethodTypesForMandate


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

pub fn get_parent_info_for_role(
    state: SessionState,
    user_from_token: UserFromToken,
    role: role_api::GetRoleRequest,
) -> UserResponse<role_api::RoleInfoWithParents>


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

impl ConnectorValidation for for Paypal


// Function: encode_payload
// File: crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs
// Module: hyperswitch_connectors

pub fn encode_payload(
    payload: &[&str],
) -> Result<String, error_stack::Report<errors::ConnectorError>>


// Trait: PaymentDistributionAccumulator
// File: crates/analytics/src/payments/accumulator.rs
// Module: analytics

pub trait PaymentDistributionAccumulator


// Struct: GetSubscriptionPlansRequest
// File: crates/hyperswitch_domain_models/src/router_request_types/subscriptions.rs
// Module: hyperswitch_domain_models
// Implementations: 0

pub struct GetSubscriptionPlansRequest


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

pub struct AmountBreakdown


// Function: retrieve_payment_method_core
// File: crates/router/src/core/payment_methods.rs
// Module: router

pub fn retrieve_payment_method_core(
    pm_data: &Option<domain::PaymentMethodData>,
    state: &SessionState,
    payment_intent: &PaymentIntent,
    payment_attempt: &PaymentAttempt,
    merchant_key_store: &domain::MerchantKeyStore,
    business_profile: Option<&domain::Profile>,
) -> RouterResult<(Option<domain::PaymentMethodData>, Option<String>)>


// Struct: RuleMigrationError
// File: crates/api_models/src/routing.rs
// Module: api_models
// Implementations: 0

pub struct RuleMigrationError


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

impl api::RefundSync for for Braintree


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

pub fn new() -> &'static Self


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

impl api::Payment for for Opennode


// Struct: AmountDetails
// File: crates/hyperswitch_domain_models/src/payments.rs
// Module: hyperswitch_domain_models
// Implementations: 1

pub struct AmountDetails


// Implementation: impl PaymentUpdate
// File: crates/router/src/core/payments/operations/payment_update.rs
// Module: router
// Methods: 2 total (0 public)

impl PaymentUpdate


// File: crates/scheduler/src/consumer/types.rs
// Module: scheduler

pub mod batch;
pub mod process_data;

pub use self::batch::ProcessTrackerBatch;


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

pub struct SyncResponseBankRedirect


// Function: customers_delete
// File: crates/openapi/src/routes/customers.rs
// Module: openapi

pub fn customers_delete()


// Function: retrieve_dispute_evidence
// File: crates/router/src/routes/disputes.rs
// Module: router

pub fn retrieve_dispute_evidence(
    state: web::Data<AppState>,
    req: HttpRequest,
    path: web::Path<String>,
) -> HttpResponse


// Struct: NetAmount
// File: crates/hyperswitch_domain_models/src/payments/payment_attempt.rs
// Module: hyperswitch_domain_models
// Implementations: 1

pub struct NetAmount


// Function: get_totp_secret_from_redis
// File: crates/router/src/utils/user/two_factor_auth.rs
// Module: router

pub fn get_totp_secret_from_redis(
    state: &SessionState,
    user_id: &str,
) -> UserResult<Option<masking::Secret<String>>>


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

pub struct GetApiEventMetricRequest


// Struct: DynamicRoutingUpdateConfigQuery
// File: crates/api_models/src/routing.rs
// Module: api_models
// Implementations: 0

pub struct DynamicRoutingUpdateConfigQuery


// File: crates/router/src/routes/metrics/request.rs
// Module: router
// Public functions: 1

use crate::services::ApplicationResponse;

pub fn track_response_status_code<Q>(response: &ApplicationResponse<Q>) -> i64 {
    match response {
        ApplicationResponse::Json(_)
        | ApplicationResponse::StatusOk
        | ApplicationResponse::TextPlain(_)
        | ApplicationResponse::Form(_)
        | ApplicationResponse::GenericLinkForm(_)
        | ApplicationResponse::PaymentLinkForm(_)
        | ApplicationResponse::FileData(_)
        | ApplicationResponse::JsonWithHeaders(_) => 200,
        ApplicationResponse::JsonForRedirection(_) => 302,
    }
}


// Struct: AmazonpayFinalizeResponse
// File: crates/hyperswitch_connectors/src/connectors/amazonpay/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct AmazonpayFinalizeResponse


// Implementation: impl Default for for RecoveryTimestamp
// File: crates/router/src/types/storage/revenue_recovery.rs
// Module: router
// Methods: 1 total (0 public)

impl Default for for RecoveryTimestamp


// Struct: RoutingRetrieveResponse
// File: crates/api_models/src/routing.rs
// Module: api_models
// Implementations: 0

// Documentation: Response of the retrieved routing configs for a merchant account

pub struct RoutingRetrieveResponse


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

pub struct HelcimCaptureRequest


// Function: create_domain_model_from_request
// File: crates/hyperswitch_domain_models/src/payments.rs
// Module: hyperswitch_domain_models

pub fn create_domain_model_from_request(
        payment_id: &id_type::GlobalPaymentId,
        merchant_context: &merchant_context::MerchantContext,
        profile: &business_profile::Profile,
        request: api_models::payments::PaymentsCreateIntentRequest,
        decrypted_payment_intent: DecryptedPaymentIntent,
    ) -> CustomResult<Self, errors::api_error_response::ApiErrorResponse>


// Function: get_acquirer_details_from_network
// File: crates/hyperswitch_domain_models/src/business_profile.rs
// Module: hyperswitch_domain_models

pub fn get_acquirer_details_from_network(
        &self,
        network: common_enums::CardNetwork,
    ) -> Option<AcquirerConfig>


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

impl ConnectorSpecifications for for Nuvei


// File: crates/hyperswitch_connectors/src/connectors/taxjar/transformers.rs
// Module: hyperswitch_connectors
// Public structs: 8

use common_enums::enums;
use common_utils::types::{FloatMajorUnit, FloatMajorUnitForConnector};
use error_stack::report;
use hyperswitch_domain_models::{
    router_data::{ConnectorAuthType, RouterData},
    router_request_types::PaymentsTaxCalculationData,
    router_response_types::TaxCalculationResponseData,
    types,
};
use hyperswitch_interfaces::errors;
use masking::Secret;
use serde::{Deserialize, Serialize};

use crate::{
    types::ResponseRouterData,
    utils::{self, AddressDetailsData},
};

pub struct TaxjarRouterData<T> {
    pub amount: FloatMajorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
    pub order_amount: FloatMajorUnit,
    pub shipping: FloatMajorUnit,
    pub router_data: T,
}

impl<T> From<(FloatMajorUnit, FloatMajorUnit, FloatMajorUnit, T)> for TaxjarRouterData<T> {
    fn from(
        (amount, order_amount, shipping, item): (FloatMajorUnit, FloatMajorUnit, FloatMajorUnit, T),
    ) -> Self {
        Self {
            amount,
            order_amount,
            shipping,
            router_data: item,
        }
    }
}

#[derive(Default, Debug, Serialize, PartialEq)]
pub struct TaxjarPaymentsRequest {
    to_country: enums::CountryAlpha2,
    to_zip: Secret<String>,
    to_state: Secret<String>,
    to_city: Option<String>,
    to_street: Option<Secret<String>>,
    amount: FloatMajorUnit,
    shipping: FloatMajorUnit,
    line_items: Vec<LineItem>,
}

#[derive(Serialize, Deserialize, Debug, PartialEq)]
pub struct LineItem {
    id: Option<String>,
    quantity: Option<u16>,
    product_tax_code: Option<String>,
    unit_price: Option<FloatMajorUnit>,
}

#[derive(Default, Debug, Serialize, Eq, PartialEq)]
pub struct TaxjarCard {
    number: cards::CardNumber,
    expiry_month: Secret<String>,
    expiry_year: Secret<String>,
    cvc: Secret<String>,
    complete: bool,
}

impl TryFrom<&TaxjarRouterData<&types::PaymentsTaxCalculationRouterData>>
    for TaxjarPaymentsRequest
{
    type Error = error_stack::Report<errors::ConnectorError>;
    fn try_from(
        item: &TaxjarRouterData<&types::PaymentsTaxCalculationRouterData>,
    ) -> Result<Self, Self::Error> {
        let request = &item.router_data.request;
        let shipping = &item
            .router_data
            .request
            .shipping_address
            .address
            .clone()
            .ok_or(errors::ConnectorError::MissingRequiredField {
                field_name: "address",
            })?;

        match request.order_details.clone() {
            Some(order_details) => {
                let line_items: Result<Vec<LineItem>, error_stack::Report<errors::ConnectorError>> =
                    order_details
                        .iter()
                        .map(|line_item| {
                            Ok(LineItem {
                                id: line_item.product_id.clone(),
                                quantity: Some(line_item.quantity),
                                product_tax_code: line_item.product_tax_code.clone(),
                                unit_price: Some(item.order_amount),
                            })
                        })
                        .collect();

                Ok(Self {
                    to_country: shipping.get_country()?.to_owned(),
                    to_zip: shipping.get_zip()?.to_owned(),
                    to_state: shipping.to_state_code()?.to_owned(),
                    to_city: shipping.get_optional_city(),
                    to_street: shipping.get_optional_line1(),
                    amount: item.amount,
                    shipping: item.shipping,
                    line_items: line_items?,
                })
            }
            None => Err(report!(errors::ConnectorError::MissingRequiredField {
                field_name: "order_details"
            })),
        }
    }
}

pub struct TaxjarAuthType {
    pub(super) api_key: Secret<String>,
}

impl TryFrom<&ConnectorAuthType> for TaxjarAuthType {
    type Error = error_stack::Report<errors::ConnectorError>;
    fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
        match auth_type {
            ConnectorAuthType::HeaderKey { api_key } => Ok(Self {
                api_key: api_key.to_owned(),
            }),
            _ => Err(errors::ConnectorError::FailedToObtainAuthType.into()),
        }
    }
}

#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct TaxjarPaymentsResponse {
    tax: Tax,
}

#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct Tax {
    amount_to_collect: FloatMajorUnit, //calculated_tax_amount
}

impl<F>
    TryFrom<
        ResponseRouterData<
            F,
            TaxjarPaymentsResponse,
            PaymentsTaxCalculationData,
            TaxCalculationResponseData,
        >,
    > for RouterData<F, PaymentsTaxCalculationData, TaxCalculationResponseData>
{
    type Error = error_stack::Report<errors::ConnectorError>;
    fn try_from(
        item: ResponseRouterData<
            F,
            TaxjarPaymentsResponse,
            PaymentsTaxCalculationData,
            TaxCalculationResponseData,
        >,
    ) -> Result<Self, Self::Error> {
        let currency = item.data.request.currency;
        let amount_to_collect = item.response.tax.amount_to_collect;
        let calculated_tax = utils::convert_back_amount_to_minor_units(
            &FloatMajorUnitForConnector,
            amount_to_collect,
            currency,
        )?;

        Ok(Self {
            response: Ok(TaxCalculationResponseData {
                order_tax_amount: calculated_tax,
            }),
            ..item.data
        })
    }
}

#[derive(Default, Debug, Serialize, Deserialize, PartialEq)]
pub struct TaxjarErrorResponse {
    pub status: i64,
    pub error: String,
    pub detail: String,
}


// Implementation: impl ActivePaymentsMetricsBucketIdentifier
// File: crates/api_models/src/analytics/active_payments.rs
// Module: api_models
// Methods: 1 total (1 public)

impl ActivePaymentsMetricsBucketIdentifier


// Implementation: impl api::RefundSync for for Trustpay
// File: crates/hyperswitch_connectors/src/connectors/trustpay.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::RefundSync for for Trustpay


// Struct: Katapult
// File: crates/hyperswitch_connectors/src/connectors/katapult.rs
// Module: hyperswitch_connectors
// Implementations: 17
// Traits: api::Payment, api::PaymentSession, api::ConnectorAccessToken, api::MandateSetup, api::PaymentAuthorize, api::PaymentSync, api::PaymentCapture, api::PaymentVoid, api::Refund, api::RefundExecute, api::RefundSync, api::PaymentToken, ConnectorCommon, ConnectorValidation, webhooks::IncomingWebhook, ConnectorSpecifications

pub struct Katapult

api::Payment api::PaymentSession api::ConnectorAccessToken api::MandateSetup api::PaymentAuthorize api::PaymentSync api::PaymentCapture api::PaymentVoid api::Refund api::RefundExecute api::RefundSync api::PaymentToken ConnectorCommon ConnectorValidation webhooks::IncomingWebhook ConnectorSpecifications


// Implementation: impl GetCaptureMethod for for PaymentsAuthorizeData
// File: crates/hyperswitch_connectors/src/connectors/aci/transformers.rs
// Module: hyperswitch_connectors
// Methods: 1 total (0 public)

impl GetCaptureMethod for for PaymentsAuthorizeData


    Herefordshire,
    #[strum(serialize = "HRT")]
    Hertfordshire,
    #[strum(serialize = "HLD")]
    Highland,
    #[strum(serialize = "IVC")]
    Inverclyde,
    #[strum(serialize = "IOW")]
    IsleOfWight,
    #[strum(serialize = "IOS")]
    IslesOfScilly,
    #[strum(serialize = "KEN")]
    Kent,
    #[strum(serialize = "KIR")]
    Kirklees,
    #[strum(serialize = "KWL")]
    Knowsley,
    #[strum(serialize = "LAN")]
    Lancashire,
    #[strum(serialize = "LRN")]
    LarneBoroughCouncil,
    #[strum(serialize = "LDS")]
    Leeds,
    #[strum(serialize = "LEC")]
    Leicestershire,
    #[strum(serialize = "LMV")]
    LimavadyBoroughCouncil,
    #[strum(serialize = "LIN")]
    Lincolnshire,
    #[strum(serialize = "LBC")]
    LisburnAndCastlereagh,
    #[strum(serialize = "LSB")]
    LisburnCityCouncil,
    #[strum(serialize = "LIV")]
    Liverpool,
    #[strum(serialize = "BDG")]
    LondonBoroughOfBarkingAndDagenham,
    #[strum(serialize = "BNE")]
    LondonBoroughOfBarnet,
    #[strum(serialize = "BEX")]
    LondonBoroughOfBexley,
    #[strum(serialize = "BEN")]
    LondonBoroughOfBrent,
    #[strum(serialize = "BRY")]
    LondonBoroughOfBromley,
    #[strum(serialize = "CMD")]
    LondonBoroughOfCamden,
    #[strum(serialize = "CRY")]
    LondonBoroughOfCroydon,
    #[strum(serialize = "EAL")]
    LondonBoroughOfEaling,
    #[strum(serialize = "ENF")]
    LondonBoroughOfEnfield,
    #[strum(serialize = "HCK")]
    LondonBoroughOfHackney,
    #[strum(serialize = "HMF")]
    LondonBoroughOfHammersmithAndFulham,
    #[strum(serialize = "HRY")]
    LondonBoroughOfHaringey,
    #[strum(serialize = "HRW")]
    LondonBoroughOfHarrow,
    #[strum(serialize = "HAV")]
    LondonBoroughOfHavering,
    #[strum(serialize = "HIL")]
    LondonBoroughOfHillingdon,
    #[strum(serialize = "HNS")]
    LondonBoroughOfHounslow,
    #[strum(serialize = "ISL")]
    LondonBoroughOfIslington,
    #[strum(serialize = "LBH")]
    LondonBoroughOfLambeth,
    #[strum(serialize = "LEW")]
    LondonBoroughOfLewisham,
    #[strum(serialize = "MRT")]
    LondonBoroughOfMerton,
    #[strum(serialize = "NWM")]
    LondonBoroughOfNewham,
    #[strum(serialize = "RDB")]
    LondonBoroughOfRedbridge,
    #[strum(serialize = "RIC")]
    LondonBoroughOfRichmondUponThames,
    #[strum(serialize = "SWK")]
    LondonBoroughOfSouthwark,
    #[strum(serialize = "STN")]
    LondonBoroughOfSutton,
    #[strum(serialize = "TWH")]
    LondonBoroughOfTowerHamlets,
    #[strum(serialize = "WFT")]
    LondonBoroughOfWalthamForest,
    #[strum(serialize = "WND")]
    LondonBoroughOfWandsworth,
    #[strum(serialize = "MFT")]
    MagherafeltDistrictCouncil,
    #[strum(serialize = "MAN")]
    Manchester,
    #[strum(serialize = "MDW")]
    Medway,
    #[strum(serialize = "MTY")]
    MerthyrTydfilCountyBorough,
    #[strum(serialize = "WGN")]
    MetropolitanBoroughOfWigan,
    #[strum(serialize = "MEA")]
    MidAndEastAntrim,
    #[strum(serialize = "MUL")]
    MidUlster,
    #[strum(serialize = "MDB")]
    Middlesbrough,
    #[strum(serialize = "MLN")]
    Midlothian,
    #[strum(serialize = "MIK")]
    MiltonKeynes,
    #[strum(serialize = "MON")]
    Monmouthshire,
    #[strum(serialize = "MRY")]
    Moray,
    #[strum(serialize = "MYL")]
    MoyleDistrictCouncil,
    #[strum(serialize = "NTL")]
    NeathPortTalbotCountyBorough,
    #[strum(serialize = "NET")]
    NewcastleUponTyne,
    #[strum(serialize = "NWP")]
    Newport,
    #[strum(serialize = "NYM")]
    NewryAndMourneDistrictCouncil,
    #[strum(serialize = "NMD")]
    NewryMourneAndDown,
    #[strum(serialize = "NTA")]
    NewtownabbeyBoroughCouncil,
    #[strum(serialize = "NFK")]
    Norfolk,
    #[strum(serialize = "NAY")]
    NorthAyrshire,
    #[strum(serialize = "NDN")]
    NorthDownBoroughCouncil,
    #[strum(serialize = "NEL")]
    NorthEastLincolnshire,
    #[strum(serialize = "NLK")]
    NorthLanarkshire,
    #[strum(serialize = "NLN")]
    NorthLincolnshire,
    #[strum(serialize = "NSM")]
    NorthSomerset,
    #[strum(serialize = "NTY")]
    NorthTyneside,
    #[strum(serialize = "NYK")]
    NorthYorkshire,
    #[strum(serialize = "NTH")]
    Northamptonshire,
    #[strum(serialize = "NIR")]
    NorthernIreland,
    #[strum(serialize = "NBL")]
    Northumberland,
    #[strum(serialize = "NTT")]
    Nottinghamshire,
    #[strum(serialize = "OLD")]
    Oldham,
    #[strum(serialize = "OMH")]
    OmaghDistrictCouncil,
    #[strum(serialize = "ORK")]
    OrkneyIslands,
    #[strum(serialize = "ELS")]
    OuterHebrides,
    #[strum(serialize = "OXF")]
    Oxfordshire,
    #[strum(serialize = "PEM")]
    Pembrokeshire,
    #[strum(serialize = "PKN")]
    PerthAndKinross,
    #[strum(serialize = "POL")]
    Poole,
    #[strum(serialize = "POW")]
    Powys,
    #[strum(serialize = "RDG")]
    Reading,
    #[strum(serialize = "RCC")]
    RedcarAndCleveland,
    #[strum(serialize = "RFW")]
    Renfrewshire,
    #[strum(serialize = "RCT")]
    RhonddaCynonTaf,
    #[strum(serialize = "RCH")]
    Rochdale,
    #[strum(serialize = "ROT")]
    Rotherham,
    #[strum(serialize = "GRE")]
    RoyalBoroughOfGreenwich,
    #[strum(serialize = "KEC")]
    RoyalBoroughOfKensingtonAndChelsea,
    #[strum(serialize = "KTT")]
    RoyalBoroughOfKingstonUponThames,
    #[strum(serialize = "RUT")]
    Rutland,
    #[strum(serialize = "SH-HL")]
    SaintHelena,
    #[strum(serialize = "SLF")]
    Salford,
    #[strum(serialize = "SAW")]
    Sandwell,
    #[strum(serialize = "SCT")]
    Scotland,
    #[strum(serialize = "SCB")]
    ScottishBorders,
    #[strum(serialize = "SFT")]
    Sefton,
    #[strum(serialize = "SHF")]
    Sheffield,
    #[strum(serialize = "ZET")]
    ShetlandIslands,
    #[strum(serialize = "SHR")]
    Shropshire,
    #[strum(serialize = "SLG")]
    Slough,
    #[strum(serialize = "SOL")]
    Solihull,
    #[strum(serialize = "SOM")]
    Somerset,
    #[strum(serialize = "SAY")]
    SouthAyrshire,
    #[strum(serialize = "SGC")]
    SouthGloucestershire,
    #[strum(serialize = "SLK")]
    SouthLanarkshire,
    #[strum(serialize = "STY")]
    SouthTyneside,
    #[strum(serialize = "SOS")]
    SouthendOnSea,
    #[strum(serialize = "SHN")]
    StHelens,
    #[strum(serialize = "STS")]
    Staffordshire,
    #[strum(serialize = "STG")]
    Stirling,
    #[strum(serialize = "SKP")]
    Stockport,
    #[strum(serialize = "STT")]
    StocktonOnTees,
    #[strum(serialize = "STB")]
    StrabaneDistrictCouncil,
    #[strum(serialize = "SFK")]
    Suffolk,
    #[strum(serialize = "SRY")]
    Surrey,
    #[strum(serialize = "SWD")]
    Swindon,
    #[strum(serialize = "TAM")]
    Tameside,
    #[strum(serialize = "TFW")]
    TelfordAndWrekin,
    #[strum(serialize = "THR")]
    Thurrock,
    #[strum(serialize = "TOB")]
    Torbay,
    #[strum(serialize = "TOF")]
    Torfaen,
    #[strum(serialize = "TRF")]
    Trafford,
    #[strum(serialize = "UKM")]
    UnitedKingdom,
    #[strum(serialize = "VGL")]
    ValeOfGlamorgan,
    #[strum(serialize = "WKF")]
    Wakefield,
    #[strum(serialize = "WLS")]
    Wales,
    #[strum(serialize = "WLL")]
    Walsall,
    #[strum(serialize = "WRT")]
    Warrington,
    #[strum(serialize = "WAR")]
    Warwickshire,
    #[strum(serialize = "WBK")]
    WestBerkshire,
    #[strum(serialize = "WDU")]
    WestDunbartonshire,
    #[strum(serialize = "WLN")]
    WestLothian,
    #[strum(serialize = "WSX")]
    WestSussex,
    #[strum(serialize = "WIL")]
    Wiltshire,
    #[strum(serialize = "WNM")]
    WindsorAndMaidenhead,
    #[strum(serialize = "WRL")]
    Wirral,
    #[strum(serialize = "WOK")]
    Wokingham,
    #[strum(serialize = "WOR")]
    Worcestershire,
    #[strum(serialize = "WRX")]
    WrexhamCountyBorough,
}

#[derive(
    Debug, Clone, PartialEq, Eq, Serialize, Deserialize, strum::Display, strum::EnumString,
)]
pub enum BelgiumStatesAbbreviation {
    #[strum(serialize = "VAN")]
    Antwerp,
    #[strum(serialize = "BRU")]
    BrusselsCapitalRegion,
    #[strum(serialize = "VOV")]
    EastFlanders,
    #[strum(serialize = "VLG")]
    Flanders,
    #[strum(serialize = "VBR")]
    FlemishBrabant,
    #[strum(serialize = "WHT")]
    Hainaut,
    #[strum(serialize = "VLI")]
    Limburg,
    #[strum(serialize = "WLG")]
    Liege,
    #[strum(serialize = "WLX")]
    Luxembourg,
    #[strum(serialize = "WNA")]
    Namur,
    #[strum(serialize = "WAL")]
    Wallonia,
    #[strum(serialize = "WBR")]
    WalloonBrabant,
    #[strum(serialize = "VWV")]
    WestFlanders,
}

#[derive(
    Debug, Clone, PartialEq, Eq, Serialize, Deserialize, strum::Display, strum::EnumString,
)]
pub enum LuxembourgStatesAbbreviation {
    #[strum(serialize = "CA")]
    CantonOfCapellen,
    #[strum(serialize = "CL")]
    CantonOfClervaux,
    #[strum(serialize = "DI")]
    CantonOfDiekirch,
    #[strum(serialize = "EC")]
    CantonOfEchternach,
    #[strum(serialize = "ES")]
    CantonOfEschSurAlzette,
    #[strum(serialize = "GR")]
    CantonOfGrevenmacher,
    #[strum(serialize = "LU")]
    CantonOfLuxembourg,
    #[strum(serialize = "ME")]
    CantonOfMersch,
    #[strum(serialize = "RD")]
    CantonOfRedange,
    #[strum(serialize = "RM")]
    CantonOfRemich,
    #[strum(serialize = "VD")]
    CantonOfVianden,
    #[strum(serialize = "WI")]
    CantonOfWiltz,
    #[strum(serialize = "D")]
    DiekirchDistrict,
    #[strum(serialize = "G")]
    GrevenmacherDistrict,
    #[strum(serialize = "L")]
    LuxembourgDistrict,
}

#[derive(
    Debug, Clone, PartialEq, Eq, Serialize, Deserialize, strum::Display, strum::EnumString,
)]
pub enum RussiaStatesAbbreviation {
    #[strum(serialize = "ALT")]
    AltaiKrai,
    #[strum(serialize = "AL")]
    AltaiRepublic,
    #[strum(serialize = "AMU")]
    AmurOblast,
    #[strum(serialize = "ARK")]
    Arkhangelsk,
    #[strum(serialize = "AST")]
    AstrakhanOblast,
    #[strum(serialize = "BEL")]
    BelgorodOblast,
    #[strum(serialize = "BRY")]
    BryanskOblast,
    #[strum(serialize = "CE")]
    ChechenRepublic,
    #[strum(serialize = "CHE")]
    ChelyabinskOblast,
    #[strum(serialize = "CHU")]
    ChukotkaAutonomousOkrug,
    #[strum(serialize = "CU")]
    ChuvashRepublic,
    #[strum(serialize = "IRK")]
    Irkutsk,
    #[strum(serialize = "IVA")]
    IvanovoOblast,
    #[strum(serialize = "YEV")]
    JewishAutonomousOblast,
    #[strum(serialize = "KB")]
    KabardinoBalkarRepublic,
    #[strum(serialize = "KGD")]
    Kaliningrad,
    #[strum(serialize = "KLU")]
    KalugaOblast,
    #[strum(serialize = "KAM")]
    KamchatkaKrai,
    #[strum(serialize = "KC")]
    KarachayCherkessRepublic,
    #[strum(serialize = "KEM")]
    KemerovoOblast,
    #[strum(serialize = "KHA")]
    KhabarovskKrai,
    #[strum(serialize = "KHM")]
    KhantyMansiAutonomousOkrug,
    #[strum(serialize = "KIR")]
    KirovOblast,
    #[strum(serialize = "KO")]
    KomiRepublic,
    #[strum(serialize = "KOS")]
    KostromaOblast,
    #[strum(serialize = "KDA")]
    KrasnodarKrai,
    #[strum(serialize = "KYA")]
    KrasnoyarskKrai,
    #[strum(serialize = "KGN")]
    KurganOblast,
    #[strum(serialize = "KRS")]
    KurskOblast,
    #[strum(serialize = "LEN")]
    LeningradOblast,
    #[strum(serialize = "LIP")]
    LipetskOblast,
    #[strum(serialize = "MAG")]
    MagadanOblast,
    #[strum(serialize = "ME")]
    MariElRepublic,
    #[strum(serialize = "MOW")]
    Moscow,
    #[strum(serialize = "MOS")]
    MoscowOblast,
    #[strum(serialize = "MUR")]
    MurmanskOblast,
    #[strum(serialize = "NEN")]
    NenetsAutonomousOkrug,
    #[strum(serialize = "NIZ")]
    NizhnyNovgorodOblast,
    #[strum(serialize = "NGR")]
    NovgorodOblast,
    #[strum(serialize = "NVS")]
    Novosibirsk,
    #[strum(serialize = "OMS")]
    OmskOblast,
    #[strum(serialize = "ORE")]
    OrenburgOblast,
    #[strum(serialize = "ORL")]
    OryolOblast,
    #[strum(serialize = "PNZ")]
    PenzaOblast,
    #[strum(serialize = "PER")]
    PermKrai,
    #[strum(serialize = "PRI")]
    PrimorskyKrai,
    #[strum(serialize = "PSK")]
    PskovOblast,
    #[strum(serialize = "AD")]
    RepublicOfAdygea,
    #[strum(serialize = "BA")]
    RepublicOfBashkortostan,
    #[strum(serialize = "BU")]
    RepublicOfBuryatia,
    #[strum(serialize = "DA")]
    RepublicOfDagestan,
    #[strum(serialize = "IN")]
    RepublicOfIngushetia,
    #[strum(serialize = "KL")]
    RepublicOfKalmykia,
    #[strum(serialize = "KR")]
    RepublicOfKarelia,
    #[strum(serialize = "KK")]
    RepublicOfKhakassia,
    #[strum(serialize = "MO")]
    RepublicOfMordovia,
    #[strum(serialize = "SE")]
    RepublicOfNorthOssetiaAlania,
    #[strum(serialize = "TA")]
    RepublicOfTatarstan,
    #[strum(serialize = "ROS")]
    RostovOblast,
    #[strum(serialize = "RYA")]
    RyazanOblast,
    #[strum(serialize = "SPE")]
    SaintPetersburg,
    #[strum(serialize = "SA")]
    SakhaRepublic,
    #[strum(serialize = "SAK")]
    Sakhalin,
    #[strum(serialize = "SAM")]
    SamaraOblast,
    #[strum(serialize = "SAR")]
    SaratovOblast,
    #[strum(serialize = "UA-40")]
    Sevastopol,
    #[strum(serialize = "SMO")]
    SmolenskOblast,
    #[strum(serialize = "STA")]
    StavropolKrai,
    #[strum(serialize = "SVE")]
    Sverdlovsk,
    #[strum(serialize = "TAM")]
    TambovOblast,
    #[strum(serialize = "TOM")]
    TomskOblast,
    #[strum(serialize = "TUL")]
    TulaOblast,
    #[strum(serialize = "TY")]
    TuvaRepublic,
    #[strum(serialize = "TVE")]
    TverOblast,
    #[strum(serialize = "TYU")]
    TyumenOblast,
    #[strum(serialize = "UD")]
    UdmurtRepublic,
    #[strum(serialize = "ULY")]
    UlyanovskOblast,
    #[strum(serialize = "VLA")]
    VladimirOblast,
    #[strum(serialize = "VLG")]
    VologdaOblast,
    #[strum(serialize = "VOR")]
    VoronezhOblast,
    #[strum(serialize = "YAN")]
    YamaloNenetsAutonomousOkrug,
    #[strum(serialize = "YAR")]
    YaroslavlOblast,
    #[strum(serialize = "ZAB")]
    ZabaykalskyKrai,
}

#[derive(
    Debug, Clone, PartialEq, Eq, Serialize, Deserialize, strum::Display, strum::EnumString,
)]
pub enum SanMarinoStatesAbbreviation {
    #[strum(serialize = "01")]
    Acquaviva,
    #[strum(serialize = "06")]
    BorgoMaggiore,
    #[strum(serialize = "02")]
    Chiesanuova,
    #[strum(serialize = "03")]
    Domagnano,
    #[strum(serialize = "04")]
    Faetano,
    #[strum(serialize = "05")]
    Fiorentino,
    #[strum(serialize = "08")]
    Montegiardino,
    #[strum(serialize = "07")]
    SanMarino,
    #[strum(serialize = "09")]
    Serravalle,
}

#[derive(
    Debug, Clone, PartialEq, Eq, Serialize, Deserialize, strum::Display, strum::EnumString,
)]
pub enum SerbiaStatesAbbreviation {
    #[strum(serialize = "00")]
    Belgrade,

    #[strum(serialize = "01")]
    BorDistrict,

    #[strum(serialize = "02")]
    BraničevoDistrict,

    #[strum(serialize = "03")]
    CentralBanatDistrict,

    #[strum(serialize = "04")]
    JablanicaDistrict,

    #[strum(serialize = "05")]
    KolubaraDistrict,

    #[strum(serialize = "06")]
    MačvaDistrict,

    #[strum(serialize = "07")]
    MoravicaDistrict,

    #[strum(serialize = "08")]
    NišavaDistrict,

    #[strum(serialize = "09")]
    NorthBanatDistrict,

    #[strum(serialize = "10")]
    NorthBačkaDistrict,

    #[strum(serialize = "11")]
    PirotDistrict,

    #[strum(serialize = "12")]
    PodunavljeDistrict,

    #[strum(serialize = "13")]
    PomoravljeDistrict,

    #[strum(serialize = "14")]
    PčinjaDistrict,

    #[strum(serialize = "15")]
    RasinaDistrict,

    #[strum(serialize = "16")]
    RaškaDistrict,

    #[strum(serialize = "17")]
    SouthBanatDistrict,

    #[strum(serialize = "18")]
    SouthBačkaDistrict,

    #[strum(serialize = "19")]
    SremDistrict,

    #[strum(serialize = "20")]
    ToplicaDistrict,

    #[strum(serialize = "21")]
    Vojvodina,

    #[strum(serialize = "22")]
    WestBačkaDistrict,

    #[strum(serialize = "23")]
    ZaječarDistrict,

    #[strum(serialize = "24")]
    ZlatiborDistrict,

    #[strum(serialize = "25")]
    ŠumadijaDistrict,
}

#[derive(
    Debug, Clone, PartialEq, Eq, Serialize, Deserialize, strum::Display, strum::EnumString,
)]
pub enum SlovakiaStatesAbbreviation {
    #[strum(serialize = "BC")]
    BanskaBystricaRegion,
    #[strum(serialize = "BL")]
    BratislavaRegion,
    #[strum(serialize = "KI")]
    KosiceRegion,
    #[strum(serialize = "NI")]
    NitraRegion,
    #[strum(serialize = "PV")]
    PresovRegion,
    #[strum(serialize = "TC")]
    TrencinRegion,
    #[strum(serialize = "TA")]
    TrnavaRegion,
    #[strum(serialize = "ZI")]
    ZilinaRegion,
}

#[derive(
    Debug, Clone, PartialEq, Eq, Serialize, Deserialize, strum::Display, strum::EnumString,
)]
pub enum SloveniaStatesAbbreviation {
    #[strum(serialize = "001")]
    Ajdovščina,
    #[strum(serialize = "213")]
    Ankaran,
    #[strum(serialize = "002")]
    Beltinci,
    #[strum(serialize = "148")]
    Benedikt,
    #[strum(serialize = "149")]
    BistricaObSotli,
    #[strum(serialize = "003")]
    Bled,
    #[strum(serialize = "150")]
    Bloke,
    #[strum(serialize = "004")]
    Bohinj,
    #[strum(serialize = "005")]
    Borovnica,
    #[strum(serialize = "006")]
    Bovec,
    #[strum(serialize = "151")]
    Braslovče,
    #[strum(serialize = "007")]
    Brda,
    #[strum(serialize = "008")]
    Brezovica,
    #[strum(serialize = "009")]
    Brežice,
    #[strum(serialize = "152")]
    Cankova,
    #[strum(serialize = "012")]
    CerkljeNaGorenjskem,
    #[strum(serialize = "013")]
    Cerknica,
    #[strum(serialize = "014")]
    Cerkno,
    #[strum(serialize = "153")]
    Cerkvenjak,
    #[strum(serialize = "011")]
    CityMunicipalityOfCelje,
    #[strum(serialize = "085")]
    CityMunicipalityOfNovoMesto,
    #[strum(serialize = "018")]
    Destrnik,
    #[strum(serialize = "019")]
    Divača,
    #[strum(serialize = "154")]
    Dobje,
    #[strum(serialize = "020")]
    Dobrepolje,
    #[strum(serialize = "155")]
    Dobrna,
    #[strum(serialize = "021")]
    DobrovaPolhovGradec,
    #[strum(serialize = "156")]
    Dobrovnik,
    #[strum(serialize = "022")]
    DolPriLjubljani,
    #[strum(serialize = "157")]
    DolenjskeToplice,
    #[strum(serialize = "023")]
    Domžale,
    #[strum(serialize = "024")]
    Dornava,
    #[strum(serialize = "025")]
    Dravograd,
    #[strum(serialize = "026")]
    Duplek,
    #[strum(serialize = "027")]
    GorenjaVasPoljane,
    #[strum(serialize = "028")]
    Gorišnica,
    #[strum(serialize = "207")]
    Gorje,
    #[strum(serialize = "029")]
    GornjaRadgona,
    #[strum(serialize = "030")]
    GornjiGrad,
    #[strum(serialize = "031")]
    GornjiPetrovci,
    #[strum(serialize = "158")]
    Grad,
    #[strum(serialize = "032")]
    Grosuplje,
    #[strum(serialize = "159")]
    Hajdina,
    #[strum(serialize = "161")]
    Hodoš,
    #[strum(serialize = "162")]
    Horjul,
    #[strum(serialize = "160")]
    HočeSlivnica,
    #[strum(serialize = "034")]
    Hrastnik,
    #[strum(serialize = "035")]
    HrpeljeKozina,
    #[strum(serialize = "036")]
    Idrija,
    #[strum(serialize = "037")]
    Ig,
    #[strum(serialize = "039")]
    IvančnaGorica,
    #[strum(serialize = "040")]
    Izola,
    #[strum(serialize = "041")]
    Jesenice,
    #[strum(serialize = "163")]
    Jezersko,
    #[strum(serialize = "042")]
    Jursinci,
    #[strum(serialize = "043")]
    Kamnik,
    #[strum(serialize = "044")]
    KanalObSoci,
    #[strum(serialize = "045")]
    Kidricevo,
    #[strum(serialize = "046")]
    Kobarid,
    #[strum(serialize = "047")]
    Kobilje,
    #[strum(serialize = "049")]
    Komen,
    #[strum(serialize = "164")]
    Komenda,
    #[strum(serialize = "050")]
    Koper,
    #[strum(serialize = "197")]
    KostanjevicaNaKrki,
    #[strum(serialize = "165")]
    Kostel,
    #[strum(serialize = "051")]
    Kozje,
    #[strum(serialize = "048")]
    Kocevje,
    #[strum(serialize = "052")]
    Kranj,
    #[strum(serialize = "053")]
    KranjskaGora,
    #[strum(serialize = "166")]
    Krizevci,
    #[strum(serialize = "055")]
    Kungota,
    #[strum(serialize = "056")]
    Kuzma,
    #[strum(serialize = "057")]
    Lasko,
    #[strum(serialize = "058")]
    Lenart,
    #[strum(serialize = "059")]
    Lendava,
    #[strum(serialize = "060")]
    Litija,
    #[strum(serialize = "061")]
    Ljubljana,
    #[strum(serialize = "062")]
    Ljubno,
    #[strum(serialize = "063")]
    Ljutomer,
    #[strum(serialize = "064")]
    Logatec,
    #[strum(serialize = "208")]
    LogDragomer,
    #[strum(serialize = "167")]
    LovrencNaPohorju,
    #[strum(serialize = "065")]
    LoskaDolina,
    #[strum(serialize = "066")]
    LoskiPotok,
    #[strum(serialize = "068")]
    Lukovica,
    #[strum(serialize = "067")]
    Luče,
    #[strum(serialize = "069")]
    Majsperk,
    #[strum(serialize = "198")]
    Makole,
    #[strum(serialize = "070")]
    Maribor,
    #[strum(serialize = "168")]
    Markovci,
    #[strum(serialize = "071")]
    Medvode,
    #[strum(serialize = "072")]
    Menges,
    #[strum(serialize = "073")]
    Metlika,
    #[strum(serialize = "074")]
    Mezica,
    #[strum(serialize = "169")]
    MiklavzNaDravskemPolju,
    #[strum(serialize = "075")]
    MirenKostanjevica,
    #[strum(serialize = "212")]
    Mirna,
    #[strum(serialize = "170")]
    MirnaPec,
    #[strum(serialize = "076")]
    Mislinja,
    #[strum(serialize = "199")]
    MokronogTrebelno,
    #[strum(serialize = "078")]
    MoravskeToplice,
    #[strum(serialize = "077")]
    Moravce,
    #[strum(serialize = "079")]
    Mozirje,
    #[strum(serialize = "195")]
    Apače,
    #[strum(serialize = "196")]
    Cirkulane,
    #[strum(serialize = "038")]
    IlirskaBistrica,
    #[strum(serialize = "054")]
    Krsko,
    #[strum(serialize = "123")]
    Skofljica,
    #[strum(serialize = "080")]
    MurskaSobota,
    #[strum(serialize = "081")]
    Muta,
    #[strum(serialize = "082")]
    Naklo,
    #[strum(serialize = "083")]
    Nazarje,
    #[strum(serialize = "084")]
    NovaGorica,
    #[strum(serialize = "086")]
    Odranci,
    #[strum(serialize = "171")]
    Oplotnica,
    #[strum(serialize = "087")]
    Ormoz,
    #[strum(serialize = "088")]
    Osilnica,
    #[strum(serialize = "089")]
    Pesnica,
    #[strum(serialize = "090")]
    Piran,
    #[strum(serialize = "091")]
    Pivka,
    #[strum(serialize = "172")]
    Podlehnik,
    #[strum(serialize = "093")]
    Podvelka,
    #[strum(serialize = "092")]
    Podcetrtek,
    #[strum(serialize = "200")]
    Poljcane,
    #[strum(serialize = "173")]
    Polzela,
    #[strum(serialize = "094")]
    Postojna,
    #[strum(serialize = "174")]
    Prebold,
    #[strum(serialize = "095")]
    Preddvor,
    #[strum(serialize = "175")]
    Prevalje,
    #[strum(serialize = "096")]
    Ptuj,
    #[strum(serialize = "097")]
    Puconci,
    #[strum(serialize = "100")]
    Radenci,
    #[strum(serialize = "099")]
    Radece,
    #[strum(serialize = "101")]
    RadljeObDravi,
    #[strum(serialize = "102")]
    Radovljica,
    #[strum(serialize = "103")]
    RavneNaKoroskem,
    #[strum(serialize = "176")]
    Razkrizje,
    #[strum(serialize = "098")]
    RaceFram,
    #[strum(serialize = "201")]
    RenčeVogrsko,
    #[strum(serialize = "209")]
    RecicaObSavinji,
    #[strum(serialize = "104")]
    Ribnica,
    #[strum(serialize = "177")]
    RibnicaNaPohorju,
    #[strum(serialize = "107")]
    Rogatec,
    #[strum(serialize = "106")]
    RogaskaSlatina,
    #[strum(serialize = "105")]
    Rogasovci,
    #[strum(serialize = "108")]
    Ruse,
    #[strum(serialize = "178")]
    SelnicaObDravi,
    #[strum(serialize = "109")]
    Semic,
    #[strum(serialize = "110")]
    Sevnica,
    #[strum(serialize = "111")]
    Sezana,
    #[strum(serialize = "112")]
    SlovenjGradec,
    #[strum(serialize = "113")]
    SlovenskaBistrica,
    #[strum(serialize = "114")]
    SlovenskeKonjice,
    #[strum(serialize = "179")]
    Sodrazica,
    #[strum(serialize = "180")]
    Solcava,
    #[strum(serialize = "202")]


// File: crates/external_services/src/managers/encryption_management.rs
// Module: external_services
// Public functions: 2

//! Encryption management util module

use std::sync::Arc;

use common_utils::errors::CustomResult;
use hyperswitch_interfaces::encryption_interface::{
    EncryptionError, EncryptionManagementInterface,
};

#[cfg(feature = "aws_kms")]
use crate::aws_kms;
use crate::no_encryption::core::NoEncryption;

/// Enum representing configuration options for encryption management.
#[derive(Debug, Clone, Default, serde::Deserialize)]
#[serde(tag = "encryption_manager")]
#[serde(rename_all = "snake_case")]
pub enum EncryptionManagementConfig {
    /// AWS KMS configuration
    #[cfg(feature = "aws_kms")]
    AwsKms {
        /// AWS KMS config
        aws_kms: aws_kms::core::AwsKmsConfig,
    },

    /// Variant representing no encryption
    #[default]
    NoEncryption,
}

impl EncryptionManagementConfig {
    /// Verifies that the client configuration is usable
    pub fn validate(&self) -> Result<(), &'static str> {
        match self {
            #[cfg(feature = "aws_kms")]
            Self::AwsKms { aws_kms } => aws_kms.validate(),

            Self::NoEncryption => Ok(()),
        }
    }

    /// Retrieves the appropriate encryption client based on the configuration.
    pub async fn get_encryption_management_client(
        &self,
    ) -> CustomResult<Arc<dyn EncryptionManagementInterface>, EncryptionError> {
        Ok(match self {
            #[cfg(feature = "aws_kms")]
            Self::AwsKms { aws_kms } => Arc::new(aws_kms::core::AwsKmsClient::new(aws_kms).await),

            Self::NoEncryption => Arc::new(NoEncryption),
        })
    }
}


// Struct: SignifydFrmMetadata
// File: crates/hyperswitch_connectors/src/connectors/signifyd/transformers/api.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct SignifydFrmMetadata


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

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


// Implementation: impl MerchantAccount
// File: crates/router/src/routes/app.rs
// Module: router
// Methods: 1 total (1 public)

impl MerchantAccount


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

pub fn refund_retrieve_core(
    state: SessionState,
    merchant_context: domain::MerchantContext,
    profile_id: Option<common_utils::id_type::ProfileId>,
    request: refunds::RefundsRetrieveRequest,
    refund: diesel_refund::Refund,
) -> RouterResult<diesel_refund::Refund>


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

pub struct ReconActivation


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

impl ConnectorCommon for for Rapyd


// Function: get_parent_group_description
// File: crates/router/src/services/authorization/info.rs
// Module: router

pub fn get_parent_group_description(group: ParentGroup) -> Option<&'static str>


// Struct: OverpaymentAbsoluteThreshold
// File: crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct OverpaymentAbsoluteThreshold


// Function: retrieve_payment_method_from_vault
// File: crates/router/src/core/payment_methods/vault.rs
// Module: router

pub fn retrieve_payment_method_from_vault(
    state: &routes::SessionState,
    merchant_context: &domain::MerchantContext,
    profile: &domain::Profile,
    pm: &domain::PaymentMethod,
) -> RouterResult<pm_types::VaultRetrieveResponse>


// Function: add_refund_sync_task
// File: crates/router/src/core/refunds_v2.rs
// Module: router

pub fn add_refund_sync_task(
    db: &dyn db::StorageInterface,
    refund: &diesel_refund::Refund,
    runner: storage::ProcessTrackerRunner,
) -> errors::RouterResult<storage::ProcessTracker>


// Implementation: impl MerchantAccountCreate
// File: crates/api_models/src/admin.rs
// Module: api_models
// Methods: 4 total (4 public)

impl MerchantAccountCreate


// Module Structure
// File: crates/router/src/types/api/authentication.rs
// Module: router

// Public exports:
pub use hyperswitch_domain_models::{
    router_flow_types::authentication::{
        Authentication, PostAuthentication, PreAuthentication, PreAuthenticationVersionCall,
    },
    router_request_types::authentication::MessageCategory,
};


// Struct: MonerisPaymentMethodData
// File: crates/hyperswitch_connectors/src/connectors/moneris/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct MonerisPaymentMethodData


// Struct: PayuRefundRequest
// File: crates/hyperswitch_connectors/src/connectors/payu/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct PayuRefundRequest


// Function: profile_retrieve
// File: crates/router/src/routes/profiles.rs
// Module: router

pub fn profile_retrieve(
    state: web::Data<AppState>,
    req: HttpRequest,
    path: web::Path<(
        common_utils::id_type::MerchantId,
        common_utils::id_type::ProfileId,
    )


// Function: decide_storage_scheme
// File: crates/storage_impl/src/redis/kv_store.rs
// Module: storage_impl

pub fn decide_storage_scheme<T, D>(
    store: &KVRouterStore<T>,
    storage_scheme: MerchantStorageScheme,
    operation: Op<'_>,
) -> MerchantStorageScheme
where
    D: de::DeserializeOwned
        + serde::Serialize
        + Debug
        + KvStorePartition
        + UniqueConstraints
        + Sync,
    T: crate::database::store::DatabaseStore,


// Struct: PaymentProxyIntent
// File: crates/router/src/core/payments/operations/proxy_payments_intent.rs
// Module: router
// Implementations: 1
// Traits: ValidateStatusForOperation

pub struct PaymentProxyIntent


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

impl api::PaymentSync for for Paytm


// Struct: DeleteCardResp
// File: crates/payment_methods/src/controller.rs
// Module: payment_methods
// Implementations: 0

pub struct DeleteCardResp


// Function: mk_get_card_response
// File: crates/router/src/core/payment_methods/transformers.rs
// Module: router

pub fn mk_get_card_response(card: GetCardResponse) -> errors::RouterResult<Card>


// Function: from_decision_engine_approach
// File: crates/router/src/core/payments/routing/utils.rs
// Module: router

pub fn from_decision_engine_approach(approach: &str) -> Self


// Struct: BodyResponse
// File: crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct BodyResponse


// Struct: CustomerDeleteResponse
// File: crates/api_models/src/customers.rs
// Module: api_models
// Implementations: 0

pub struct CustomerDeleteResponse


// Function: terminate_auth_select
// File: crates/router/src/core/user.rs
// Module: router

pub fn terminate_auth_select(
    state: SessionState,
    user_token: auth::UserFromSinglePurposeToken,
    req: user_api::AuthSelectRequest,
) -> UserResponse<user_api::TokenResponse>


// Implementation: impl DatabaseStore for for ReplicaStore
// File: crates/storage_impl/src/database/store.rs
// Module: storage_impl
// Methods: 5 total (0 public)

impl DatabaseStore for for ReplicaStore


// Function: update_totp
// File: crates/router/src/core/user.rs
// Module: router

pub fn update_totp(
    state: SessionState,
    user_token: auth::UserIdFromAuth,
    req: user_api::VerifyTotpRequest,
) -> UserResponse<()>


// Trait: AuthServiceExchangeToken
// File: crates/pm_auth/src/types/api/auth_service.rs
// Module: pm_auth

pub trait AuthServiceExchangeToken: super::ConnectorIntegration<ExchangeToken, ExchangeTokenRequest, ExchangeTokenResponse>


// Implementation: impl api::MandateSetup for for Powertranz
// File: crates/hyperswitch_connectors/src/connectors/powertranz.rs
// Module: hyperswitch_connectors
// Methods: 0 total (0 public)

impl api::MandateSetup for for Powertranz


// Struct: ThunesAuthType
// File: crates/hyperswitch_connectors/src/connectors/thunes/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct ThunesAuthType


// Struct: TsysSyncResponse
// File: crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs
// Module: hyperswitch_connectors
// Implementations: 0

pub struct TsysSyncResponse


                    }
                }
            }
        }

        // Do not remove the `skip_all` as the key would be logged otherwise
        #[instrument(skip_all)]
        async fn batch_decrypt_via_api(
            state: &KeyManagerState,
            encrypted_data: FxHashMap<String, Encryption>,
            identifier: Identifier,
            key: &[u8],
            crypt_algo: V,
        ) -> CustomResult<FxHashMap<String, Self>, errors::CryptoError> {
            // If encryption service is not enabled, fall back to application encryption or else call encryption service
            if !is_encryption_service_enabled(state) {
                Self::batch_decrypt(encrypted_data, key, crypt_algo).await
            } else {
                let result: Result<
                    BatchDecryptDataResponse,
                    error_stack::Report<errors::KeyManagerClientError>,
                > = call_encryption_service(
                    state,
                    Method::POST,
                    "data/decrypt",
                    TransientBatchDecryptDataRequest::from((encrypted_data.clone(), identifier)),
                )
                .await;
                let decrypted = match result {
                    Ok(response) => {
                        ForeignTryFrom::foreign_try_from((encrypted_data.clone(), response))
                    }
                    Err(err) => {
                        logger::error!("Decryption error {:?}", err);
                        Err(err.change_context(errors::CryptoError::DecodingFailed))
                    }
                };
                match decrypted {
                    Ok(de) => Ok(de),
                    Err(_) => {
                        metrics::DECRYPTION_API_FAILURES.add(1, &[]);
                        logger::info!("Fall back to Application Decryption");
                        Self::batch_decrypt(encrypted_data, key, crypt_algo).await
                    }
                }
            }
        }

        // Do not remove the `skip_all` as the key would be logged otherwise
        #[instrument(skip_all)]
        async fn batch_encrypt(
            masked_data: FxHashMap<String, Secret<Vec<u8>, S>>,
            key: &[u8],
            crypt_algo: V,
        ) -> CustomResult<FxHashMap<String, Self>, errors::CryptoError> {
            metrics::APPLICATION_ENCRYPTION_COUNT.add(1, &[]);
            masked_data
                .into_iter()
                .map(|(k, v)| {
                    Ok((
                        k,
                        Self::new(v.clone(), crypt_algo.encode_message(key, v.peek())?.into()),
                    ))
                })
                .collect()
        }

        // Do not remove the `skip_all` as the key would be logged otherwise
        #[instrument(skip_all)]
        async fn batch_decrypt(
            encrypted_data: FxHashMap<String, Encryption>,
            key: &[u8],
            crypt_algo: V,
        ) -> CustomResult<FxHashMap<String, Self>, errors::CryptoError> {
            metrics::APPLICATION_DECRYPTION_COUNT.add(1, &[]);
            encrypted_data
                .into_iter()
                .map(|(k, v)| {
                    Ok((
                        k,
                        Self::new(
                            crypt_algo
                                .decode_message(key, v.clone().into_inner().clone())?
                                .into(),
                            v.into_inner(),
                        ),
                    ))
                })
                .collect()
        }
    }
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct EncryptedJsonType<T>(T);

impl<T> EncryptedJsonType<T> {
    pub fn inner(&self) -> &T {
        &self.0
    }

    pub fn into_inner(self) -> T {
        self.0
    }
}

impl<T> From<T> for EncryptedJsonType<T> {
    fn from(value: T) -> Self {
        Self(value)
    }
}

impl<T> std::ops::Deref for EncryptedJsonType<T> {
    type Target = T;

    fn deref(&self) -> &Self::Target {
        self.inner()
    }
}

/// Type alias for `Option<Encryptable<Secret<EncryptedJsonType<T>>>>`
pub type OptionalEncryptableJsonType<T> = Option<crypto::Encryptable<Secret<EncryptedJsonType<T>>>>;

pub trait Lift<U> {
    type SelfWrapper<T>;
    type OtherWrapper<T, E>;

    fn lift<Func, E, V>(self, func: Func) -> Self::OtherWrapper<V, E>
    where
        Func: Fn(Self::SelfWrapper<U>) -> Self::OtherWrapper<V, E>;
}

impl<U> Lift<U> for Option<U> {
    type SelfWrapper<T> = Option<T>;
    type OtherWrapper<T, E> = CustomResult<Option<T>, E>;

    fn lift<Func, E, V>(self, func: Func) -> Self::OtherWrapper<V, E>
    where
        Func: Fn(Self::SelfWrapper<U>) -> Self::OtherWrapper<V, E>,
    {
        func(self)
    }
}

#[async_trait]
pub trait AsyncLift<U> {
    type SelfWrapper<T>;
    type OtherWrapper<T, E>;

    async fn async_lift<Func, F, E, V>(self, func: Func) -> Self::OtherWrapper<V, E>
    where
        Func: Fn(Self::SelfWrapper<U>) -> F + Send + Sync,
        F: futures::Future<Output = Self::OtherWrapper<V, E>> + Send;
}

#[async_trait]
impl<U, V: Lift<U> + Lift<U, SelfWrapper<U> = V> + Send> AsyncLift<U> for V {
    type SelfWrapper<T> = <V as Lift<U>>::SelfWrapper<T>;
    type OtherWrapper<T, E> = <V as Lift<U>>::OtherWrapper<T, E>;

    async fn async_lift<Func, F, E, W>(self, func: Func) -> Self::OtherWrapper<W, E>
    where
        Func: Fn(Self::SelfWrapper<U>) -> F + Send + Sync,
        F: futures::Future<Output = Self::OtherWrapper<W, E>> + Send,
    {
        func(self).await
    }
}

#[inline]
async fn encrypt<E: Clone, S>(
    state: &KeyManagerState,
    inner: Secret<E, S>,
    identifier: Identifier,
    key: &[u8],
) -> CustomResult<crypto::Encryptable<Secret<E, S>>, CryptoError>
where
    S: masking::Strategy<E>,
    crypto::Encryptable<Secret<E, S>>: TypeEncryption<E, crypto::GcmAes256, S>,
{
    record_operation_time(
        crypto::Encryptable::encrypt_via_api(state, inner, identifier, key, crypto::GcmAes256),
        &metrics::ENCRYPTION_TIME,
        &[],
    )
    .await
}

#[inline]
async fn batch_encrypt<E: Clone, S>(
    state: &KeyManagerState,
    inner: FxHashMap<String, Secret<E, S>>,
    identifier: Identifier,
    key: &[u8],
) -> CustomResult<FxHashMap<String, crypto::Encryptable<Secret<E, S>>>, CryptoError>
where
    S: masking::Strategy<E>,
    crypto::Encryptable<Secret<E, S>>: TypeEncryption<E, crypto::GcmAes256, S>,
{
    if !inner.is_empty() {
        record_operation_time(
            crypto::Encryptable::batch_encrypt_via_api(
                state,
                inner,
                identifier,
                key,
                crypto::GcmAes256,
            ),
            &metrics::ENCRYPTION_TIME,
            &[],
        )
        .await
    } else {
        Ok(FxHashMap::default())
    }
}

#[inline]
async fn encrypt_optional<E: Clone, S>(
    state: &KeyManagerState,
    inner: Option<Secret<E, S>>,
    identifier: Identifier,
    key: &[u8],
) -> CustomResult<Option<crypto::Encryptable<Secret<E, S>>>, CryptoError>
where
    Secret<E, S>: Send,
    S: masking::Strategy<E>,
    crypto::Encryptable<Secret<E, S>>: TypeEncryption<E, crypto::GcmAes256, S>,
{
    inner
        .async_map(|f| encrypt(state, f, identifier, key))
        .await
        .transpose()
}

#[inline]
async fn decrypt_optional<T: Clone, S: masking::Strategy<T>>(
    state: &KeyManagerState,
    inner: Option<Encryption>,
    identifier: Identifier,
    key: &[u8],
) -> CustomResult<Option<crypto::Encryptable<Secret<T, S>>>, CryptoError>
where
    crypto::Encryptable<Secret<T, S>>: TypeEncryption<T, crypto::GcmAes256, S>,
{
    inner
        .async_map(|item| decrypt(state, item, identifier, key))
        .await
        .transpose()
}

#[inline]
async fn decrypt<T: Clone, S: masking::Strategy<T>>(
    state: &KeyManagerState,
    inner: Encryption,
    identifier: Identifier,
    key: &[u8],
) -> CustomResult<crypto::Encryptable<Secret<T, S>>, CryptoError>
where
    crypto::Encryptable<Secret<T, S>>: TypeEncryption<T, crypto::GcmAes256, S>,
{
    record_operation_time(
        crypto::Encryptable::decrypt_via_api(state, inner, identifier, key, crypto::GcmAes256),
        &metrics::DECRYPTION_TIME,
        &[],
    )
    .await
}

#[inline]
async fn batch_decrypt<E: Clone, S>(
    state: &KeyManagerState,
    inner: FxHashMap<String, Encryption>,
    identifier: Identifier,
    key: &[u8],
) -> CustomResult<FxHashMap<String, crypto::Encryptable<Secret<E, S>>>, CryptoError>
where
    S: masking::Strategy<E>,
    crypto::Encryptable<Secret<E, S>>: TypeEncryption<E, crypto::GcmAes256, S>,
{
    if !inner.is_empty() {
        record_operation_time(
            crypto::Encryptable::batch_decrypt_via_api(
                state,
                inner,
                identifier,
                key,
                crypto::GcmAes256,
            ),
            &metrics::ENCRYPTION_TIME,
            &[],
        )
        .await
    } else {
        Ok(FxHashMap::default())
    }
}

pub enum CryptoOperation<T: Clone, S: masking::Strategy<T>> {
    Encrypt(Secret<T, S>),
    EncryptOptional(Option<Secret<T, S>>),
    Decrypt(Encryption),
    DecryptOptional(Option<Encryption>),
    BatchEncrypt(FxHashMap<String, Secret<T, S>>),
    BatchDecrypt(FxHashMap<String, Encryption>),
}

use errors::CryptoError;

#[derive(router_derive::TryGetEnumVariant)]
#[error(CryptoError::EncodingFailed)]
pub enum CryptoOutput<T: Clone, S: masking::Strategy<T>> {
    Operation(crypto::Encryptable<Secret<T, S>>),
    OptionalOperation(Option<crypto::Encryptable<Secret<T, S>>>),
    BatchOperation(FxHashMap<String, crypto::Encryptable<Secret<T, S>>>),
}

// Do not remove the `skip_all` as the key would be logged otherwise
#[instrument(skip_all, fields(table = table_name))]
pub async fn crypto_operation<T: Clone + Send, S: masking::Strategy<T>>(
    state: &KeyManagerState,
    table_name: &str,
    operation: CryptoOperation<T, S>,
    identifier: Identifier,
    key: &[u8],
) -> CustomResult<CryptoOutput<T, S>, CryptoError>
where
    Secret<T, S>: Send,
    crypto::Encryptable<Secret<T, S>>: TypeEncryption<T, crypto::GcmAes256, S>,
{
    match operation {
        CryptoOperation::Encrypt(data) => {
            let data = encrypt(state, data, identifier, key).await?;
            Ok(CryptoOutput::Operation(data))
        }
        CryptoOperation::EncryptOptional(data) => {
            let data = encrypt_optional(state, data, identifier, key).await?;
            Ok(CryptoOutput::OptionalOperation(data))
        }
        CryptoOperation::Decrypt(data) => {
            let data = decrypt(state, data, identifier, key).await?;
            Ok(CryptoOutput::Operation(data))
        }
        CryptoOperation::DecryptOptional(data) => {
            let data = decrypt_optional(state, data, identifier, key).await?;
            Ok(CryptoOutput::OptionalOperation(data))
        }
        CryptoOperation::BatchEncrypt(data) => {
            let data = batch_encrypt(state, data, identifier, key).await?;
            Ok(CryptoOutput::BatchOperation(data))
        }
        CryptoOperation::BatchDecrypt(data) => {
            let data = batch_decrypt(state, data, identifier, key).await?;
            Ok(CryptoOutput::BatchOperation(data))
        }
    }
}

pub(crate) mod metrics {
    use router_env::{counter_metric, global_meter, histogram_metric_f64};

    global_meter!(GLOBAL_METER, "ROUTER_API");

    // Encryption and Decryption metrics
    histogram_metric_f64!(ENCRYPTION_TIME, GLOBAL_METER);
    histogram_metric_f64!(DECRYPTION_TIME, GLOBAL_METER);
    counter_metric!(ENCRYPTION_API_FAILURES, GLOBAL_METER);
    counter_metric!(DECRYPTION_API_FAILURES, GLOBAL_METER);
    counter_metric!(APPLICATION_ENCRYPTION_COUNT, GLOBAL_METER);
    counter_metric!(APPLICATION_DECRYPTION_COUNT, GLOBAL_METER);
}


// Implementation: impl Role
// File: crates/diesel_models/src/query/role.rs
// Module: diesel_models
// Methods: 8 total (0 public)

impl Role


// Function: get_next_action_api
// File: crates/api_models/src/authentication.rs
// Module: api_models

pub fn get_next_action_api(
        &self,
        base_url: String,
        authentication_id: String,
    ) -> CustomResult<NextAction, errors::ParsingError>


// Implementation: impl ApiEventMetric for for CardInfoMigrationResponse
// File: crates/api_models/src/cards_info.rs
// Module: api_models
// Methods: 0 total (0 public)

impl ApiEventMetric for for CardInfoMigrationResponse


// Module Structure
// File: crates/hyperswitch_connectors/src/connectors/volt.rs
// Module: hyperswitch_connectors

// Public submodules:
pub mod transformers;


// File: crates/router/src/db/reverse_lookup.rs
// Module: router

use super::{MockDb, Store};
use crate::{
    errors::{self, CustomResult},
    types::storage::{
        enums,
        reverse_lookup::{ReverseLookup, ReverseLookupNew},
    },
};

#[async_trait::async_trait]
pub trait ReverseLookupInterface {
    async fn insert_reverse_lookup(
        &self,
        _new: ReverseLookupNew,
        _storage_scheme: enums::MerchantStorageScheme,
    ) -> CustomResult<ReverseLookup, errors::StorageError>;
    async fn get_lookup_by_lookup_id(
        &self,
        _id: &str,
        _storage_scheme: enums::MerchantStorageScheme,
    ) -> CustomResult<ReverseLookup, errors::StorageError>;
}

#[cfg(not(feature = "kv_store"))]
mod storage {
    use error_stack::report;
    use router_env::{instrument, tracing};

    use super::{ReverseLookupInterface, Store};
    use crate::{
        connection,
        errors::{self, CustomResult},
        types::storage::{
            enums,
            reverse_lookup::{ReverseLookup, ReverseLookupNew},
        },
    };

    #[async_trait::async_trait]
    impl ReverseLookupInterface for Store {
        #[instrument(skip_all)]
        async fn insert_reverse_lookup(
            &self,
            new: ReverseLookupNew,
            _storage_scheme: enums::MerchantStorageScheme,
        ) -> CustomResult<ReverseLookup, errors::StorageError> {
            let conn = connection::pg_connection_write(self).await?;
            new.insert(&conn)
                .await
                .map_err(|error| report!(errors::StorageError::from(error)))
        }

        #[instrument(skip_all)]
        async fn get_lookup_by_lookup_id(
            &self,
            id: &str,
            _storage_scheme: enums::MerchantStorageScheme,
        ) -> CustomResult<ReverseLookup, errors::StorageError> {
            let conn = connection::pg_connection_read(self).await?;
            ReverseLookup::find_by_lookup_id(id, &conn)
                .await
                .map_err(|error| report!(errors::StorageError::from(error)))
        }
    }
}

#[cfg(feature = "kv_store")]
mod storage {
    use error_stack::{report, ResultExt};
    use redis_interface::SetnxReply;
    use router_env::{instrument, tracing};
    use storage_impl::redis::kv_store::{
        decide_storage_scheme, kv_wrapper, KvOperation, Op, PartitionKey,
    };

    use super::{ReverseLookupInterface, Store};
    use crate::{
        connection,
        core::errors::utils::RedisErrorExt,
        errors::{self, CustomResult},
        types::storage::{
            enums, kv,
            reverse_lookup::{ReverseLookup, ReverseLookupNew},
        },
        utils::db_utils,
    };

    #[async_trait::async_trait]
    impl ReverseLookupInterface for Store {
        #[instrument(skip_all)]
        async fn insert_reverse_lookup(
            &self,
            new: ReverseLookupNew,
            storage_scheme: enums::MerchantStorageScheme,
        ) -> CustomResult<ReverseLookup, errors::StorageError> {
            let storage_scheme = Box::pin(decide_storage_scheme::<_, ReverseLookup>(
                self,
                storage_scheme,
                Op::Insert,
            ))
            .await;
            match storage_scheme {
                enums::MerchantStorageScheme::PostgresOnly => {
                    let conn = connection::pg_connection_write(self).await?;
                    new.insert(&conn)
                        .await
                        .map_err(|error| report!(errors::StorageError::from(error)))
                }
                enums::MerchantStorageScheme::RedisKv => {
                    let created_rev_lookup = ReverseLookup {
                        lookup_id: new.lookup_id.clone(),
                        sk_id: new.sk_id.clone(),
                        pk_id: new.pk_id.clone(),
                        source: new.source.clone(),
                        updated_by: storage_scheme.to_string(),
                    };
                    let redis_entry = kv::TypedSql {
                        op: kv::DBOperation::Insert {
                            insertable: Box::new(kv::Insertable::ReverseLookUp(new)),
                        },
                    };

                    match Box::pin(kv_wrapper::<ReverseLookup, _, _>(
                        self,
                        KvOperation::SetNx(&created_rev_lookup, redis_entry),
                        PartitionKey::CombinationKey {
                            combination: &format!(
                                "reverse_lookup_{}",
                                &created_rev_lookup.lookup_id
                            ),
                        },
                    ))
                    .await
                    .map_err(|err| err.to_redis_failed_response(&created_rev_lookup.lookup_id))?
                    .try_into_setnx()
                    {
                        Ok(SetnxReply::KeySet) => Ok(created_rev_lookup),
                        Ok(SetnxReply::KeyNotSet) => Err(errors::StorageError::DuplicateValue {
                            entity: "reverse_lookup",
                            key: Some(created_rev_lookup.lookup_id.clone()),
                        }
                        .into()),
                        Err(er) => Err(er).change_context(errors::StorageError::KVError),
                    }
                }
            }
        }

        #[instrument(skip_all)]
        async fn get_lookup_by_lookup_id(
            &self,
            id: &str,
            storage_scheme: enums::MerchantStorageScheme,
        ) -> CustomResult<ReverseLookup, errors::StorageError> {
            let database_call = || async {
                let conn = connection::pg_connection_read(self).await?;
                ReverseLookup::find_by_lookup_id(id, &conn)
                    .await
                    .map_err(|error| report!(errors::StorageError::from(error)))
            };
            let storage_scheme = Box::pin(decide_storage_scheme::<_, ReverseLookup>(
                self,
                storage_scheme,
                Op::Find,
            ))
            .await;
            match storage_scheme {
                enums::MerchantStorageScheme::PostgresOnly => database_call().await,
                enums::MerchantStorageScheme::RedisKv => {
                    let redis_fut = async {
                        Box::pin(kv_wrapper(
                            self,
                            KvOperation::<ReverseLookup>::Get,
                            PartitionKey::CombinationKey {
                                combination: &format!("reverse_lookup_{id}"),
                            },
                        ))
                        .await?
                        .try_into_get()
                    };

                    Box::pin(db_utils::try_redis_get_else_try_database_get(
                        redis_fut,
                        database_call,
                    ))
                    .await
                }
            }
        }
    }
}

#[async_trait::async_trait]
impl ReverseLookupInterface for MockDb {
    async fn insert_reverse_lookup(
        &self,
        new: ReverseLookupNew,
        _storage_scheme: enums::MerchantStorageScheme,
    ) -> CustomResult<ReverseLookup, errors::StorageError> {
        let reverse_lookup_insert = ReverseLookup::from(new);
        self.reverse_lookups
            .lock()
            .await
            .push(reverse_lookup_insert.clone());
        Ok(reverse_lookup_insert)
    }

    async fn get_lookup_by_lookup_id(
        &self,
        lookup_id: &str,
        _storage_scheme: enums::MerchantStorageScheme,
    ) -> CustomResult<ReverseLookup, errors::StorageError> {
        self.reverse_lookups
            .lock()
            .await
            .iter()
            .find(|reverse_lookup| reverse_lookup.lookup_id == lookup_id)
            .ok_or(
                errors::StorageError::ValueNotFound(format!(
                    "No reverse lookup found for lookup_id = {lookup_id}",
                ))
                .into(),
            )
            .cloned()
    }
}


// File: crates/router/src/types/storage/user_authentication_method.rs
// Module: router

pub use diesel_models::user_authentication_method::*;


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

impl ConnectorSpecifications for for Dlocal


// Function: create_payment_method
// File: crates/router/src/core/payment_methods/tokenize/card_executor.rs
// Module: router

pub fn create_payment_method(
        &self,
        stored_locker_resp: &StoreLockerResponse,
        network_token_details: &NetworkTokenizationResponse,
        card_details: &domain::CardDetail,
        customer_id: &id_type::CustomerId,
    ) -> RouterResult<domain::PaymentMethod>


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

use scheduler::consumer::workflows::ProcessTrackerWorkflow;

#[cfg(feature = "v1")]
use crate::core::payment_methods::vault;
use crate::{errors, logger::error, routes::SessionState, types::storage};

pub struct DeleteTokenizeDataWorkflow;

#[async_trait::async_trait]
impl ProcessTrackerWorkflow<SessionState> for DeleteTokenizeDataWorkflow {
    #[cfg(feature = "v1")]
    async fn execute_workflow<'a>(
        &'a self,
        state: &'a SessionState,
        process: storage::ProcessTracker,
    ) -> Result<(), errors::ProcessTrackerError> {
        Ok(vault::start_tokenize_data_workflow(state, &process).await?)
    }

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

    async fn error_handler<'a>(
        &'a self,
        _state: &'a SessionState,
        process: storage::ProcessTracker,
        _error: errors::ProcessTrackerError,
    ) -> errors::CustomResult<(), errors::ProcessTrackerError> {
        error!(%process.id, "Failed while executing workflow");
        Ok(())
    }
}


// Function: validate
// File: crates/router/src/configs/validations.rs
// Module: router

pub fn validate(&self) -> Result<(), ApplicationError>


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

impl ConnectorValidation for for Payme


// Struct: LogSpanInitializerMiddleware
// File: crates/router/src/middleware.rs
// Module: router
// Implementations: 0

pub struct LogSpanInitializerMiddleware<S>


// Function: get_error_reason
// File: crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs
// Module: hyperswitch_connectors

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


// Function: customer_retrieve
// File: crates/router/src/compatibility/stripe/customers.rs
// Module: router

pub fn customer_retrieve(
    state: web::Data<routes::AppState>,
    req: HttpRequest,
    path: web::Path<id_type::CustomerId>,
) -> HttpResponse


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

pub struct SdkInitiatedCount


// Function: syn_error
// File: crates/router_derive/src/macros/helpers.rs
// Module: router_derive

pub fn syn_error(span: Span, message: &str) -> syn::Error


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

impl Responder


// File: crates/injector/src/lib.rs
// Module: injector

pub mod consts;
pub mod injector;
pub mod types;
pub mod vault_metadata;

// Re-export all functionality
pub use consts::*;
pub use injector::*;
pub use types::*;
pub use vault_metadata::*;