Skip to main content

amazon_spapi/models/vendor_orders/
order_acknowledgement_item.rs

1/*
2 * Selling Partner API for Retail Procurement Orders
3 *
4 * The Selling Partner API for Retail Procurement Orders provides programmatic access to vendor orders data.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// OrderAcknowledgementItem : Details of the item being acknowledged.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OrderAcknowledgementItem {
17    /// Line item sequence number for the item.
18    #[serde(rename = "itemSequenceNumber", skip_serializing_if = "Option::is_none")]
19    pub item_sequence_number: Option<String>,
20    /// Amazon Standard Identification Number (ASIN) of an item.
21    #[serde(rename = "amazonProductIdentifier", skip_serializing_if = "Option::is_none")]
22    pub amazon_product_identifier: Option<String>,
23    /// The vendor selected product identification of the item. Should be the same as was sent in the purchase order.
24    #[serde(rename = "vendorProductIdentifier", skip_serializing_if = "Option::is_none")]
25    pub vendor_product_identifier: Option<String>,
26    #[serde(rename = "orderedQuantity")]
27    pub ordered_quantity: Box<models::vendor_orders::ItemQuantity>,
28    #[serde(rename = "netCost", skip_serializing_if = "Option::is_none")]
29    pub net_cost: Option<Box<models::vendor_orders::Money>>,
30    #[serde(rename = "listPrice", skip_serializing_if = "Option::is_none")]
31    pub list_price: Option<Box<models::vendor_orders::Money>>,
32    /// The discount multiplier that should be applied to the price if a vendor sells books with a list price. This is a multiplier factor to arrive at a final discounted price. A multiplier of .90 would be the factor if a 10% discount is given.
33    #[serde(rename = "discountMultiplier", skip_serializing_if = "Option::is_none")]
34    pub discount_multiplier: Option<String>,
35    /// This is used to indicate acknowledged quantity.
36    #[serde(rename = "itemAcknowledgements")]
37    pub item_acknowledgements: Vec<models::vendor_orders::OrderItemAcknowledgement>,
38}
39
40impl OrderAcknowledgementItem {
41    /// Details of the item being acknowledged.
42    pub fn new(ordered_quantity: models::vendor_orders::ItemQuantity, item_acknowledgements: Vec<models::vendor_orders::OrderItemAcknowledgement>) -> OrderAcknowledgementItem {
43        OrderAcknowledgementItem {
44            item_sequence_number: None,
45            amazon_product_identifier: None,
46            vendor_product_identifier: None,
47            ordered_quantity: Box::new(ordered_quantity),
48            net_cost: None,
49            list_price: None,
50            discount_multiplier: None,
51            item_acknowledgements,
52        }
53    }
54}
55