feat(payment_request): add field amount to OrderDetails and make order_details a Vec in payments_create request (#964)

This commit is contained in:
rishavkar
2023-05-15 14:45:32 +05:30
committed by GitHub
parent d7cfb4a179
commit 60e8c7317a
15 changed files with 111 additions and 56 deletions

View File

@ -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)]