1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct OrderItem {
#[serde(default, rename = "itemSequenceNumber")]
pub item_sequence_number: String,
#[serde(default, rename = "buyerProductIdentifier", skip_serializing_if = "Option::is_none")]
pub buyer_product_identifier: Option<String>,
#[serde(default, rename = "vendorProductIdentifier", skip_serializing_if = "Option::is_none")]
pub vendor_product_identifier: Option<String>,
#[serde(default, rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[serde(default, rename = "orderedQuantity")]
pub ordered_quantity: Box<crate::models::ItemQuantity>,
#[serde(default, rename = "scheduledDeliveryShipment", skip_serializing_if = "Option::is_none")]
pub scheduled_delivery_shipment: Option<Box<crate::models::ScheduledDeliveryShipment>>,
#[serde(default, rename = "giftDetails", skip_serializing_if = "Option::is_none")]
pub gift_details: Option<Box<crate::models::GiftDetails>>,
#[serde(default, rename = "netPrice")]
pub net_price: Box<crate::models::Money>,
#[serde(default, rename = "taxDetails", skip_serializing_if = "Option::is_none")]
pub tax_details: Option<Box<crate::models::OrderItemTaxDetails>>,
#[serde(default, rename = "totalPrice", skip_serializing_if = "Option::is_none")]
pub total_price: Option<Box<crate::models::Money>>,
}
impl OrderItem {
pub fn new(item_sequence_number: String, ordered_quantity: crate::models::ItemQuantity, net_price: crate::models::Money) -> OrderItem {
OrderItem {
item_sequence_number,
buyer_product_identifier: None,
vendor_product_identifier: None,
title: None,
ordered_quantity: Box::new(ordered_quantity),
scheduled_delivery_shipment: None,
gift_details: None,
net_price: Box::new(net_price),
tax_details: None,
total_price: None,
}
}
}