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




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InvoiceItem {
    /// 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>,
    #[serde(default, rename = "invoicedQuantity")]
    pub invoiced_quantity: Box<crate::models::ItemQuantity>,
    #[serde(default, rename = "netCost")]
    pub net_cost: Box<crate::models::Money>,
    /// The purchase order number for this order. Formatting Notes: 8-character alpha-numeric code.
    #[serde(default, rename = "purchaseOrderNumber")]
    pub purchase_order_number: String,
    /// The vendor's order number for this order.
    #[serde(default, rename = "vendorOrderNumber", skip_serializing_if = "Option::is_none")]
    pub vendor_order_number: Option<String>,
    /// HSN tax code. The HSN number cannot contain alphabets.
    #[serde(default, rename = "hsnCode", skip_serializing_if = "Option::is_none")]
    pub hsn_code: Option<String>,
    /// Individual tax details per line item.
    #[serde(default, rename = "taxDetails", skip_serializing_if = "Option::is_none")]
    pub tax_details: Option<Vec<crate::models::TaxDetail>>,
    /// Individual charge details per line item.
    #[serde(default, rename = "chargeDetails", skip_serializing_if = "Option::is_none")]
    pub charge_details: Option<Vec<crate::models::ChargeDetails>>,
}

impl InvoiceItem {
    pub fn new(item_sequence_number: String, invoiced_quantity: crate::models::ItemQuantity, net_cost: crate::models::Money, purchase_order_number: String) -> InvoiceItem {
        InvoiceItem {
            item_sequence_number,
            buyer_product_identifier: None,
            vendor_product_identifier: None,
            invoiced_quantity: Box::new(invoiced_quantity),
            net_cost: Box::new(net_cost),
            purchase_order_number,
            vendor_order_number: None,
            hsn_code: None,
            tax_details: None,
            charge_details: None,
        }
    }
}