amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Shipment Invoicing
 *
 * The Selling Partner API for Shipment Invoicing helps you programmatically retrieve shipment invoice information in the Brazil marketplace for a selling partner’s Fulfillment by Amazon (FBA) orders.
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ShipmentItem : The shipment item information required by a seller to issue a shipment invoice.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ShipmentItem {
    /// The Amazon Standard Identification Number (ASIN) of the item.
    #[serde(rename = "ASIN", skip_serializing_if = "Option::is_none")]
    pub asin: Option<String>,
    /// The seller SKU of the item.
    #[serde(rename = "SellerSKU", skip_serializing_if = "Option::is_none")]
    pub seller_sku: Option<String>,
    /// The Amazon-defined identifier for the order item.
    #[serde(rename = "OrderItemId", skip_serializing_if = "Option::is_none")]
    pub order_item_id: Option<String>,
    /// The name of the item.
    #[serde(rename = "Title", skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    /// The number of items ordered.
    #[serde(rename = "QuantityOrdered", skip_serializing_if = "Option::is_none")]
    pub quantity_ordered: Option<f64>,
    #[serde(rename = "ItemPrice", skip_serializing_if = "Option::is_none")]
    pub item_price: Option<Box<models::shipment_invoicing_v0::Money>>,
    #[serde(rename = "ShippingPrice", skip_serializing_if = "Option::is_none")]
    pub shipping_price: Option<Box<models::shipment_invoicing_v0::Money>>,
    #[serde(rename = "GiftWrapPrice", skip_serializing_if = "Option::is_none")]
    pub gift_wrap_price: Option<Box<models::shipment_invoicing_v0::Money>>,
    #[serde(rename = "ShippingDiscount", skip_serializing_if = "Option::is_none")]
    pub shipping_discount: Option<Box<models::shipment_invoicing_v0::Money>>,
    #[serde(rename = "PromotionDiscount", skip_serializing_if = "Option::is_none")]
    pub promotion_discount: Option<Box<models::shipment_invoicing_v0::Money>>,
    /// The list of serial numbers.
    #[serde(rename = "SerialNumbers", skip_serializing_if = "Option::is_none")]
    pub serial_numbers: Option<Vec<String>>,
}

impl ShipmentItem {
    /// The shipment item information required by a seller to issue a shipment invoice.
    pub fn new() -> ShipmentItem {
        ShipmentItem {
            asin: None,
            seller_sku: None,
            order_item_id: None,
            title: None,
            quantity_ordered: None,
            item_price: None,
            shipping_price: None,
            gift_wrap_price: None,
            shipping_discount: None,
            promotion_discount: None,
            serial_numbers: None,
        }
    }
}