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
/*
 * Selling Partner API for Retail Procurement Orders
 *
 * The Selling Partner API for Retail Procurement Orders provides programmatic access to vendor orders 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,
    /// Amazon Standard Identification Number (ASIN) of an item.
    #[serde(default, rename = "amazonProductIdentifier", skip_serializing_if = "Option::is_none")]
    pub amazon_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>,
    #[serde(default, rename = "orderedQuantity")]
    pub ordered_quantity: Box<crate::models::ItemQuantity>,
    /// When true, we will accept backorder confirmations for this item.
    #[serde(default, rename = "isBackOrderAllowed")]
    pub is_back_order_allowed: bool,
    #[serde(default, rename = "netCost", skip_serializing_if = "Option::is_none")]
    pub net_cost: Option<Box<crate::models::Money>>,
    #[serde(default, rename = "listPrice", skip_serializing_if = "Option::is_none")]
    pub list_price: Option<Box<crate::models::Money>>,
}

impl OrderItem {
    pub fn new(item_sequence_number: String, ordered_quantity: crate::models::ItemQuantity, is_back_order_allowed: bool) -> OrderItem {
        OrderItem {
            item_sequence_number,
            amazon_product_identifier: None,
            vendor_product_identifier: None,
            ordered_quantity: Box::new(ordered_quantity),
            is_back_order_allowed,
            net_cost: None,
            list_price: None,
        }
    }
}