mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	refactor(openai): update open-api spec to have payment changes (#4043)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -354,6 +354,7 @@ pub struct PaymentsRequest { | |||||||
|     pub mandate_data: Option<MandateData>, |     pub mandate_data: Option<MandateData>, | ||||||
|  |  | ||||||
|     /// Passing this object during payments confirm . The customer_acceptance sub object is usually passed by the SDK or client |     /// Passing this object during payments confirm . The customer_acceptance sub object is usually passed by the SDK or client | ||||||
|  |     #[schema(value_type = Option<CustomerAcceptance>)] | ||||||
|     pub customer_acceptance: Option<CustomerAcceptance>, |     pub customer_acceptance: Option<CustomerAcceptance>, | ||||||
|  |  | ||||||
|     /// A unique identifier to link the payment to a mandate. To do Recurring payments after a mandate has been created, pass the mandate_id instead of payment_method_data |     /// A unique identifier to link the payment to a mandate. To do Recurring payments after a mandate has been created, pass the mandate_id instead of payment_method_data | ||||||
|  | |||||||
| @ -124,7 +124,8 @@ pub async fn customers_mandates_list() {} | |||||||
|     get, |     get, | ||||||
|     path = "/{customer_id}/payment_methods/{payment_method_id}/default", |     path = "/{customer_id}/payment_methods/{payment_method_id}/default", | ||||||
|     params ( |     params ( | ||||||
|         ("method_id" = String, Path, description = "Set the Payment Method as Default for the Customer"), |         ("customer_id" = String,Path, description ="The unique identifier for the Customer"), | ||||||
|  |         ("payment_method_id" = String,Path, description = "The unique identifier for the Payment Method"), | ||||||
|     ), |     ), | ||||||
|     responses( |     responses( | ||||||
|         (status = 200, description = "Payment Method has been set as default", body =CustomerDefaultPaymentMethodResponse ), |         (status = 200, description = "Payment Method has been set as default", body =CustomerDefaultPaymentMethodResponse ), | ||||||
|  | |||||||
| @ -100,6 +100,14 @@ | |||||||
|                           "currency": "USD" |                           "currency": "USD" | ||||||
|                         } |                         } | ||||||
|                       } |                       } | ||||||
|  |                     }, | ||||||
|  |                     "customer_acceptance": { | ||||||
|  |                       "acceptance_type": "offline", | ||||||
|  |                       "accepted_at": "1963-05-03T04:07:52.723Z", | ||||||
|  |                       "online": { | ||||||
|  |                         "ip_address": "127.0.0.1", | ||||||
|  |                         "user_agent": "amet irure esse" | ||||||
|  |                       } | ||||||
|                     } |                     } | ||||||
|                   }) |                   }) | ||||||
|                 ) |                 ) | ||||||
| @ -302,6 +310,14 @@ pub fn payments_update() {} | |||||||
|                   "card_holder_name": "joseph Doe", |                   "card_holder_name": "joseph Doe", | ||||||
|                   "card_cvc": "123" |                   "card_cvc": "123" | ||||||
|                 } |                 } | ||||||
|  |               }, | ||||||
|  |               "customer_acceptance": { | ||||||
|  |                 "acceptance_type": "offline", | ||||||
|  |                 "accepted_at": "1963-05-03T04:07:52.723Z", | ||||||
|  |                 "online": { | ||||||
|  |                   "ip_address": "127.0.0.1", | ||||||
|  |                   "user_agent": "amet irure esse" | ||||||
|  |                 } | ||||||
|               } |               } | ||||||
|             } |             } | ||||||
|           ) |           ) | ||||||
|  | |||||||
| @ -2606,6 +2606,14 @@ | |||||||
|                     "authentication_type": "no_three_ds", |                     "authentication_type": "no_three_ds", | ||||||
|                     "confirm": true, |                     "confirm": true, | ||||||
|                     "currency": "USD", |                     "currency": "USD", | ||||||
|  |                     "customer_acceptance": { | ||||||
|  |                       "acceptance_type": "offline", | ||||||
|  |                       "accepted_at": "1963-05-03T04:07:52.723Z", | ||||||
|  |                       "online": { | ||||||
|  |                         "ip_address": "127.0.0.1", | ||||||
|  |                         "user_agent": "amet irure esse" | ||||||
|  |                       } | ||||||
|  |                     }, | ||||||
|                     "customer_id": "StripeCustomer123", |                     "customer_id": "StripeCustomer123", | ||||||
|                     "mandate_data": { |                     "mandate_data": { | ||||||
|                       "customer_acceptance": { |                       "customer_acceptance": { | ||||||
| @ -3153,6 +3161,14 @@ | |||||||
|               "examples": { |               "examples": { | ||||||
|                 "Confirm a payment with payment method data": { |                 "Confirm a payment with payment method data": { | ||||||
|                   "value": { |                   "value": { | ||||||
|  |                     "customer_acceptance": { | ||||||
|  |                       "acceptance_type": "offline", | ||||||
|  |                       "accepted_at": "1963-05-03T04:07:52.723Z", | ||||||
|  |                       "online": { | ||||||
|  |                         "ip_address": "127.0.0.1", | ||||||
|  |                         "user_agent": "amet irure esse" | ||||||
|  |                       } | ||||||
|  |                     }, | ||||||
|                     "payment_method": "card", |                     "payment_method": "card", | ||||||
|                     "payment_method_data": { |                     "payment_method_data": { | ||||||
|                       "card": { |                       "card": { | ||||||
| @ -4208,9 +4224,18 @@ | |||||||
|         "operationId": "Set the Payment Method as Default", |         "operationId": "Set the Payment Method as Default", | ||||||
|         "parameters": [ |         "parameters": [ | ||||||
|           { |           { | ||||||
|             "name": "method_id", |             "name": "customer_id", | ||||||
|             "in": "path", |             "in": "path", | ||||||
|             "description": "Set the Payment Method as Default for the Customer", |             "description": "The unique identifier for the Customer", | ||||||
|  |             "required": true, | ||||||
|  |             "schema": { | ||||||
|  |               "type": "string" | ||||||
|  |             } | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "name": "payment_method_id", | ||||||
|  |             "in": "path", | ||||||
|  |             "description": "The unique identifier for the Payment Method", | ||||||
|             "required": true, |             "required": true, | ||||||
|             "schema": { |             "schema": { | ||||||
|               "type": "string" |               "type": "string" | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Amisha Prabhat
					Amisha Prabhat