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
/*
 * Selling Partner API for Direct Fulfillment Orders
 *
 * The Selling Partner API for Direct Fulfillment Orders provides programmatic access to a direct fulfillment vendor's order data.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct OrderItem {
    /// Numbering of the item on the purchase order. The first item will be 1, the second 2, and so on.
    #[serde(default, rename = "itemSequenceNumber")]
    pub item_sequence_number: String,
    /// Buyer's standard identification number (ASIN) of an item.
    #[serde(default, rename = "buyerProductIdentifier", skip_serializing_if = "Option::is_none")]
    pub buyer_product_identifier: Option<String>,
    /// The vendor selected product identification of the item.
    #[serde(default, rename = "vendorProductIdentifier", skip_serializing_if = "Option::is_none")]
    pub vendor_product_identifier: Option<String>,
    /// Title for the item.
    #[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,
        }
    }
}