fix(core): add should_call_connector_customer function to connector specification (#9569)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
AkshayaFoiger
2025-09-30 12:33:39 +05:30
committed by GitHub
parent 7654dbf436
commit bfc136cc1d
20 changed files with 85 additions and 25 deletions

View File

@ -564,6 +564,17 @@ impl ConnectorSpecifications for ConnectorEnum {
}
}
}
/// Check if connector requires create customer call
fn should_call_connector_customer(
&self,
payment_attempt: &hyperswitch_domain_models::payments::payment_attempt::PaymentAttempt,
) -> bool {
match self {
Self::Old(connector) => connector.should_call_connector_customer(payment_attempt),
Self::New(connector) => connector.should_call_connector_customer(payment_attempt),
}
}
}
impl ConnectorCommon for ConnectorEnum {