use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FulfillmentPreviewItem {
#[serde(rename = "sellerSku")]
pub seller_sku: String,
#[serde(rename = "quantity")]
pub quantity: i32,
#[serde(rename = "sellerFulfillmentOrderItemId")]
pub seller_fulfillment_order_item_id: String,
#[serde(rename = "estimatedShippingWeight", skip_serializing_if = "Option::is_none")]
pub estimated_shipping_weight: Option<Box<models::fulfillment_outbound_2020_07_01::Weight>>,
#[serde(rename = "shippingWeightCalculationMethod", skip_serializing_if = "Option::is_none")]
pub shipping_weight_calculation_method: Option<ShippingWeightCalculationMethod>,
}
impl FulfillmentPreviewItem {
pub fn new(seller_sku: String, quantity: i32, seller_fulfillment_order_item_id: String) -> FulfillmentPreviewItem {
FulfillmentPreviewItem {
seller_sku,
quantity,
seller_fulfillment_order_item_id,
estimated_shipping_weight: None,
shipping_weight_calculation_method: None,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ShippingWeightCalculationMethod {
#[serde(rename = "Package")]
Package,
#[serde(rename = "Dimensional")]
Dimensional,
}
impl Default for ShippingWeightCalculationMethod {
fn default() -> ShippingWeightCalculationMethod {
Self::Package
}
}