use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FulfillmentPreview {
#[serde(rename = "shippingSpeedCategory")]
pub shipping_speed_category: models::fulfillment_outbound_2020_07_01::ShippingSpeedCategory,
#[serde(rename = "scheduledDeliveryInfo", skip_serializing_if = "Option::is_none")]
pub scheduled_delivery_info: Option<Box<models::fulfillment_outbound_2020_07_01::ScheduledDeliveryInfo>>,
#[serde(rename = "isFulfillable")]
pub is_fulfillable: bool,
#[serde(rename = "isCODCapable")]
pub is_cod_capable: bool,
#[serde(rename = "estimatedShippingWeight", skip_serializing_if = "Option::is_none")]
pub estimated_shipping_weight: Option<Box<models::fulfillment_outbound_2020_07_01::Weight>>,
#[serde(rename = "estimatedFees", skip_serializing_if = "Option::is_none")]
pub estimated_fees: Option<Vec<models::fulfillment_outbound_2020_07_01::Fee>>,
#[serde(rename = "fulfillmentPreviewShipments", skip_serializing_if = "Option::is_none")]
pub fulfillment_preview_shipments: Option<Vec<models::fulfillment_outbound_2020_07_01::FulfillmentPreviewShipment>>,
#[serde(rename = "unfulfillablePreviewItems", skip_serializing_if = "Option::is_none")]
pub unfulfillable_preview_items: Option<Vec<models::fulfillment_outbound_2020_07_01::UnfulfillablePreviewItem>>,
#[serde(rename = "orderUnfulfillableReasons", skip_serializing_if = "Option::is_none")]
pub order_unfulfillable_reasons: Option<Vec<String>>,
#[serde(rename = "marketplaceId")]
pub marketplace_id: String,
#[serde(rename = "featureConstraints", skip_serializing_if = "Option::is_none")]
pub feature_constraints: Option<Vec<models::fulfillment_outbound_2020_07_01::FeatureSettings>>,
}
impl FulfillmentPreview {
pub fn new(shipping_speed_category: models::fulfillment_outbound_2020_07_01::ShippingSpeedCategory, is_fulfillable: bool, is_cod_capable: bool, marketplace_id: String) -> FulfillmentPreview {
FulfillmentPreview {
shipping_speed_category,
scheduled_delivery_info: None,
is_fulfillable,
is_cod_capable,
estimated_shipping_weight: None,
estimated_fees: None,
fulfillment_preview_shipments: None,
unfulfillable_preview_items: None,
order_unfulfillable_reasons: None,
marketplace_id,
feature_constraints: None,
}
}
}