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};

/// PackageGroupingInput : Packing information for the inbound plan.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PackageGroupingInput {
    /// Box level information being provided.
    #[serde(rename = "boxes")]
    pub boxes: Vec<models::fulfillment_inbound_2024_03_20::BoxInput>,
    /// The ID of the `packingGroup` that packages are grouped according to. The `PackingGroupId` can only be provided before placement confirmation, and it must belong to the confirmed `PackingOption`. One of `ShipmentId` or `PackingGroupId` must be provided with every request.
    #[serde(rename = "packingGroupId", skip_serializing_if = "Option::is_none")]
    pub packing_group_id: Option<String>,
    /// The ID of the shipment that packages are grouped according to. The `ShipmentId` can only be provided after placement confirmation, and the shipment must belong to the confirmed placement option. One of `ShipmentId` or `PackingGroupId` must be provided with every request.
    #[serde(rename = "shipmentId", skip_serializing_if = "Option::is_none")]
    pub shipment_id: Option<String>,
}

impl PackageGroupingInput {
    /// Packing information for the inbound plan.
    pub fn new(boxes: Vec<models::fulfillment_inbound_2024_03_20::BoxInput>) -> PackageGroupingInput {
        PackageGroupingInput {
            boxes,
            packing_group_id: None,
            shipment_id: None,
        }
    }
}