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
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ShipmentConfirmation {
#[serde(default, rename = "purchaseOrderNumber")]
pub purchase_order_number: String,
#[serde(default, rename = "shipmentDetails")]
pub shipment_details: Box<crate::models::ShipmentDetails>,
#[serde(default, rename = "sellingParty")]
pub selling_party: Box<crate::models::PartyIdentification>,
#[serde(default, rename = "shipFromParty")]
pub ship_from_party: Box<crate::models::PartyIdentification>,
#[serde(default, rename = "items")]
pub items: Vec<crate::models::Item>,
#[serde(default, rename = "containers", skip_serializing_if = "Option::is_none")]
pub containers: Option<Vec<crate::models::Container>>,
}
impl ShipmentConfirmation {
pub fn new(purchase_order_number: String, shipment_details: crate::models::ShipmentDetails, selling_party: crate::models::PartyIdentification, ship_from_party: crate::models::PartyIdentification, items: Vec<crate::models::Item>) -> ShipmentConfirmation {
ShipmentConfirmation {
purchase_order_number,
shipment_details: Box::new(shipment_details),
selling_party: Box::new(selling_party),
ship_from_party: Box::new(ship_from_party),
items,
containers: None,
}
}
}