mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	docs(openapi): fix payment_methods_enabled OpenAPI spec in merchant connector account APIs (#3068)
				
					
				
			This commit is contained in:
		 Sai Harsha Vardhan
					Sai Harsha Vardhan
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							9c1c44a706
						
					
				
				
					commit
					b6838c4d1a
				
			| @ -879,7 +879,7 @@ pub struct PaymentMethodsEnabled { | ||||
|     pub payment_method: common_enums::PaymentMethod, | ||||
|  | ||||
|     /// Subtype of payment method | ||||
|     #[schema(value_type = Option<Vec<PaymentMethodType>>,example = json!(["credit"]))] | ||||
|     #[schema(value_type = Option<Vec<RequestPaymentMethodTypes>>,example = json!(["credit"]))] | ||||
|     pub payment_method_types: Option<Vec<payment_methods::RequestPaymentMethodTypes>>, | ||||
| } | ||||
|  | ||||
|  | ||||
| @ -413,8 +413,11 @@ impl ResponsePaymentMethodIntermediate { | ||||
|  | ||||
| #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema, PartialEq, Eq, Hash)] | ||||
| pub struct RequestPaymentMethodTypes { | ||||
|     #[schema(value_type = PaymentMethodType)] | ||||
|     pub payment_method_type: api_enums::PaymentMethodType, | ||||
|     #[schema(value_type = Option<PaymentExperience>)] | ||||
|     pub payment_experience: Option<api_enums::PaymentExperience>, | ||||
|     #[schema(value_type = Option<Vec<CardNetwork>>)] | ||||
|     pub card_networks: Option<Vec<api_enums::CardNetwork>>, | ||||
|     /// List of currencies accepted or has the processing capabilities of the processor | ||||
|     #[schema(example = json!( | ||||
| @ -422,7 +425,7 @@ pub struct RequestPaymentMethodTypes { | ||||
|             "type": "specific_accepted", | ||||
|             "list": ["USD", "INR"] | ||||
|         } | ||||
|     ))] | ||||
|     ), value_type = Option<AcceptedCurrencies>)] | ||||
|     pub accepted_currencies: Option<admin::AcceptedCurrencies>, | ||||
|  | ||||
|     ///  List of Countries accepted or has the processing capabilities of the processor | ||||
| @ -431,7 +434,7 @@ pub struct RequestPaymentMethodTypes { | ||||
|             "type": "specific_accepted", | ||||
|             "list": ["UK", "AU"] | ||||
|         } | ||||
|     ))] | ||||
|     ), value_type = Option<AcceptedCountries>)] | ||||
|     pub accepted_countries: Option<admin::AcceptedCountries>, | ||||
|  | ||||
|     /// Minimum amount supported by the processor. To be represented in the lowest denomination of the target currency (For example, for USD it should be in cents) | ||||
|  | ||||
| @ -322,6 +322,7 @@ Never share your secret api keys. Keep them guarded and secure. | ||||
|         api_models::payment_methods::SurchargeDetailsResponse, | ||||
|         api_models::payment_methods::SurchargeResponse, | ||||
|         api_models::payment_methods::SurchargePercentage, | ||||
|         api_models::payment_methods::RequestPaymentMethodTypes, | ||||
|         api_models::refunds::RefundListRequest, | ||||
|         api_models::refunds::RefundListResponse, | ||||
|         api_models::payments::TimeRange, | ||||
|  | ||||
| @ -9312,7 +9312,7 @@ | ||||
|           "payment_method_types": { | ||||
|             "type": "array", | ||||
|             "items": { | ||||
|               "$ref": "#/components/schemas/PaymentMethodType" | ||||
|               "$ref": "#/components/schemas/RequestPaymentMethodTypes" | ||||
|             }, | ||||
|             "description": "Subtype of payment method", | ||||
|             "example": [ | ||||
| @ -11584,6 +11584,76 @@ | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|       "RequestPaymentMethodTypes": { | ||||
|         "type": "object", | ||||
|         "required": [ | ||||
|           "payment_method_type", | ||||
|           "recurring_enabled", | ||||
|           "installment_payment_enabled" | ||||
|         ], | ||||
|         "properties": { | ||||
|           "payment_method_type": { | ||||
|             "$ref": "#/components/schemas/PaymentMethodType" | ||||
|           }, | ||||
|           "payment_experience": { | ||||
|             "allOf": [ | ||||
|               { | ||||
|                 "$ref": "#/components/schemas/PaymentExperience" | ||||
|               } | ||||
|             ], | ||||
|             "nullable": true | ||||
|           }, | ||||
|           "card_networks": { | ||||
|             "type": "array", | ||||
|             "items": { | ||||
|               "$ref": "#/components/schemas/CardNetwork" | ||||
|             }, | ||||
|             "nullable": true | ||||
|           }, | ||||
|           "accepted_currencies": { | ||||
|             "allOf": [ | ||||
|               { | ||||
|                 "$ref": "#/components/schemas/AcceptedCurrencies" | ||||
|               } | ||||
|             ], | ||||
|             "nullable": true | ||||
|           }, | ||||
|           "accepted_countries": { | ||||
|             "allOf": [ | ||||
|               { | ||||
|                 "$ref": "#/components/schemas/AcceptedCountries" | ||||
|               } | ||||
|             ], | ||||
|             "nullable": true | ||||
|           }, | ||||
|           "minimum_amount": { | ||||
|             "type": "integer", | ||||
|             "format": "int32", | ||||
|             "description": "Minimum amount supported by the processor. To be represented in the lowest denomination of the target currency (For example, for USD it should be in cents)", | ||||
|             "example": 1, | ||||
|             "nullable": true | ||||
|           }, | ||||
|           "maximum_amount": { | ||||
|             "type": "integer", | ||||
|             "format": "int32", | ||||
|             "description": "Maximum amount supported by the processor. To be represented in the lowest denomination of\nthe target currency (For example, for USD it should be in cents)", | ||||
|             "example": 1313, | ||||
|             "nullable": true | ||||
|           }, | ||||
|           "recurring_enabled": { | ||||
|             "type": "boolean", | ||||
|             "description": "Boolean to enable recurring payments / mandates. Default is true.", | ||||
|             "default": true, | ||||
|             "example": false | ||||
|           }, | ||||
|           "installment_payment_enabled": { | ||||
|             "type": "boolean", | ||||
|             "description": "Boolean to enable installment / EMI / BNPL payments. Default is true.", | ||||
|             "default": true, | ||||
|             "example": false | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|       "RequestSurchargeDetails": { | ||||
|         "type": "object", | ||||
|         "required": [ | ||||
|  | ||||
		Reference in New Issue
	
	Block a user