mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 17:47:54 +08:00
refactor(dynamic_routing): add logic for creating merchant account in decision engine (#8191)
Co-authored-by: Shankar Singh C <shankar.singh@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -608,6 +608,8 @@ pub struct DynamicRoutingAlgorithmRef {
|
||||
pub dynamic_routing_volume_split: Option<u8>,
|
||||
pub elimination_routing_algorithm: Option<EliminationRoutingAlgorithm>,
|
||||
pub contract_based_routing: Option<ContractRoutingAlgorithm>,
|
||||
#[serde(default)]
|
||||
pub is_merchant_created_in_decision_engine: bool,
|
||||
}
|
||||
|
||||
pub trait DynamicRoutingAlgoAccessor {
|
||||
@ -717,6 +719,10 @@ impl DynamicRoutingAlgorithmRef {
|
||||
self.dynamic_routing_volume_split = volume
|
||||
}
|
||||
|
||||
pub fn update_merchant_creation_status_in_decision_engine(&mut self, is_created: bool) {
|
||||
self.is_merchant_created_in_decision_engine = is_created;
|
||||
}
|
||||
|
||||
pub fn is_success_rate_routing_enabled(&self) -> bool {
|
||||
self.success_based_algorithm
|
||||
.as_ref()
|
||||
|
||||
Reference in New Issue
Block a user