mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-11-01 02:57:02 +08:00 
			
		
		
		
	refactor(router): add domain type for merchant_connector_account id (#5685)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Sanchith Hegde <sanchith.hegde@juspay.in>
This commit is contained in:
		 Sai Harsha Vardhan
					Sai Harsha Vardhan
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							f33e1bb65c
						
					
				
				
					commit
					771f48cfe0
				
			| @ -251,7 +251,12 @@ pub struct RoutingAlgorithmHelpers<'h> { | ||||
| } | ||||
|  | ||||
| #[derive(Clone, Debug)] | ||||
| pub struct ConnectNameAndMCAIdForProfile<'a>(pub FxHashSet<(&'a String, String)>); | ||||
| pub struct ConnectNameAndMCAIdForProfile<'a>( | ||||
|     pub  FxHashSet<( | ||||
|         &'a String, | ||||
|         common_utils::id_type::MerchantConnectorAccountId, | ||||
|     )>, | ||||
| ); | ||||
| #[derive(Clone, Debug)] | ||||
| pub struct ConnectNameForProfile<'a>(pub FxHashSet<&'a String>); | ||||
|  | ||||
| @ -322,7 +327,7 @@ impl<'h> RoutingAlgorithmHelpers<'h> { | ||||
|                     self.name_mca_id_set.0.contains(&(&choice.connector.to_string(), mca_id.clone())), | ||||
|                     errors::ApiErrorResponse::InvalidRequestData { | ||||
|                         message: format!( | ||||
|                             "connector with name '{}' and merchant connector account id '{}' not found for the given profile", | ||||
|                             "connector with name '{}' and merchant connector account id '{:?}' not found for the given profile", | ||||
|                             choice.connector, | ||||
|                             mca_id, | ||||
|                         ) | ||||
| @ -430,7 +435,7 @@ pub async fn validate_connectors_in_routing_config( | ||||
|                 name_mca_id_set.contains(&(&choice.connector.to_string(), mca_id.clone())), | ||||
|                 errors::ApiErrorResponse::InvalidRequestData { | ||||
|                     message: format!( | ||||
|                         "connector with name '{}' and merchant connector account id '{}' not found for the given profile", | ||||
|                         "connector with name '{}' and merchant connector account id '{:?}' not found for the given profile", | ||||
|                         choice.connector, | ||||
|                         mca_id, | ||||
|                     ) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user