amazon_spapi/models/shipping_v2/
direct_purchase_result.rs

1/*
2 * Amazon Shipping API
3 *
4 * 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.
5 *
6 * The version of the OpenAPI document: v2
7 * Contact: swa-api-core@amazon.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// DirectPurchaseResult : The payload for the directPurchaseShipment operation.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DirectPurchaseResult {
17    /// The unique shipment identifier provided by a shipping service.
18    #[serde(rename = "shipmentId")]
19    pub shipment_id: String,
20    /// A list of post-purchase details about a package that will be shipped using a shipping service.
21    #[serde(rename = "packageDocumentDetailList", skip_serializing_if = "Option::is_none")]
22    pub package_document_detail_list: Option<Vec<models::shipping_v2::PackageDocumentDetail>>,
23}
24
25impl DirectPurchaseResult {
26    /// The payload for the directPurchaseShipment operation.
27    pub fn new(shipment_id: String) -> DirectPurchaseResult {
28        DirectPurchaseResult {
29            shipment_id,
30            package_document_detail_list: None,
31        }
32    }
33}
34