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

/// DirectPurchaseResult : The payload for the directPurchaseShipment operation.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DirectPurchaseResult {
    /// The unique shipment identifier provided by a shipping service.
    #[serde(rename = "shipmentId")]
    pub shipment_id: String,
    /// A list of post-purchase details about a package that will be shipped using a shipping service.
    #[serde(rename = "packageDocumentDetailList", skip_serializing_if = "Option::is_none")]
    pub package_document_detail_list: Option<Vec<models::shipping_v2::PackageDocumentDetail>>,
}

impl DirectPurchaseResult {
    /// The payload for the directPurchaseShipment operation.
    pub fn new(shipment_id: String) -> DirectPurchaseResult {
        DirectPurchaseResult {
            shipment_id,
            package_document_detail_list: None,
        }
    }
}