mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	feat(router): add api_models and openapi changes for refunds create api v2 (#6385)
This commit is contained in:
		 Sai Harsha Vardhan
					Sai Harsha Vardhan
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							4ef48c39b3
						
					
				
				
					commit
					5a10e5867a
				
			| @ -6,6 +6,7 @@ use crate::refunds::{ | ||||
|     RefundUpdateRequest, RefundsRetrieveRequest, | ||||
| }; | ||||
|  | ||||
| #[cfg(feature = "v1")] | ||||
| impl ApiEventMetric for RefundRequest { | ||||
|     fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||||
|         let payment_id = self.payment_id.clone(); | ||||
| @ -18,6 +19,7 @@ impl ApiEventMetric for RefundRequest { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "v1")] | ||||
| impl ApiEventMetric for RefundResponse { | ||||
|     fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||||
|         Some(ApiEventsType::Refund { | ||||
| @ -27,6 +29,17 @@ impl ApiEventMetric for RefundResponse { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "v2")] | ||||
| impl ApiEventMetric for RefundResponse { | ||||
|     fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||||
|         Some(ApiEventsType::Refund { | ||||
|             payment_id: self.payment_id.clone(), | ||||
|             refund_id: self.id.clone(), | ||||
|         }) | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "v1")] | ||||
| impl ApiEventMetric for RefundsRetrieveRequest { | ||||
|     fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||||
|         Some(ApiEventsType::Refund { | ||||
| @ -36,6 +49,7 @@ impl ApiEventMetric for RefundsRetrieveRequest { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "v1")] | ||||
| impl ApiEventMetric for RefundUpdateRequest { | ||||
|     fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||||
|         Some(ApiEventsType::Refund { | ||||
| @ -45,6 +59,7 @@ impl ApiEventMetric for RefundUpdateRequest { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "v1")] | ||||
| impl ApiEventMetric for RefundManualUpdateRequest { | ||||
|     fn get_api_event_type(&self) -> Option<ApiEventsType> { | ||||
|         Some(ApiEventsType::Refund { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user