mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
feat(payment_request): add field amount to OrderDetails and make order_details a Vec in payments_create request (#964)
This commit is contained in:
@ -1424,12 +1424,14 @@ pub struct OrderDetails {
|
||||
/// The quantity of the product to be purchased
|
||||
#[schema(example = 1)]
|
||||
pub quantity: u16,
|
||||
/// the amount per quantity of product
|
||||
pub amount: i64,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
|
||||
pub struct Metadata {
|
||||
/// Information about the product and quantity for specific connectors. (e.g. Klarna)
|
||||
pub order_details: Option<OrderDetails>,
|
||||
pub order_details: Option<Vec<OrderDetails>>,
|
||||
/// Any other metadata that is to be provided
|
||||
#[schema(value_type = Object, example = r#"{ "city": "NY", "unit": "245" }"#)]
|
||||
#[serde(flatten)]
|
||||
|
||||
Reference in New Issue
Block a user