amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Amazon Shipping API
 *
 * The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.
 *
 * The version of the OpenAPI document: v2
 * Contact: swa-api-core@amazon.com
 * Generated by: https://openapi-generator.tech
 */

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

/// GetShipmentDocumentsResult : The payload for the getShipmentDocuments operation.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetShipmentDocumentsResult {
    /// The unique shipment identifier provided by a shipping service.
    #[serde(rename = "shipmentId")]
    pub shipment_id: String,
    #[serde(rename = "packageDocumentDetail")]
    pub package_document_detail: Box<models::shipping_v2::PackageDocumentDetail>,
    #[serde(rename = "benefits", skip_serializing_if = "Option::is_none")]
    pub benefits: Option<Box<models::shipping_v2::Benefits>>,
}

impl GetShipmentDocumentsResult {
    /// The payload for the getShipmentDocuments operation.
    pub fn new(shipment_id: String, package_document_detail: models::shipping_v2::PackageDocumentDetail) -> GetShipmentDocumentsResult {
        GetShipmentDocumentsResult {
            shipment_id,
            package_document_detail: Box::new(package_document_detail),
            benefits: None,
        }
    }
}