amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for FBA inbound operations.
 *
 * The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability with the Send-to-Amazon user interface.
 *
 * The version of the OpenAPI document: 2024-03-20
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// MskuPrepDetail : An MSKU and its related prep details.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MskuPrepDetail {
    #[serde(rename = "allOwnersConstraint", skip_serializing_if = "Option::is_none")]
    pub all_owners_constraint: Option<models::fulfillment_inbound_2024_03_20::AllOwnersConstraint>,
    #[serde(rename = "labelOwnerConstraint", skip_serializing_if = "Option::is_none")]
    pub label_owner_constraint: Option<models::fulfillment_inbound_2024_03_20::OwnerConstraint>,
    /// The merchant SKU, a merchant-supplied identifier for a specific SKU.
    #[serde(rename = "msku")]
    pub msku: String,
    #[serde(rename = "prepCategory")]
    pub prep_category: models::fulfillment_inbound_2024_03_20::PrepCategory,
    #[serde(rename = "prepOwnerConstraint", skip_serializing_if = "Option::is_none")]
    pub prep_owner_constraint: Option<models::fulfillment_inbound_2024_03_20::OwnerConstraint>,
    /// A list of preparation types associated with a preparation category.
    #[serde(rename = "prepTypes")]
    pub prep_types: Vec<models::fulfillment_inbound_2024_03_20::PrepType>,
}

impl MskuPrepDetail {
    /// An MSKU and its related prep details.
    pub fn new(msku: String, prep_category: models::fulfillment_inbound_2024_03_20::PrepCategory, prep_types: Vec<models::fulfillment_inbound_2024_03_20::PrepType>) -> MskuPrepDetail {
        MskuPrepDetail {
            all_owners_constraint: None,
            label_owner_constraint: None,
            msku,
            prep_category,
            prep_owner_constraint: None,
            prep_types,
        }
    }
}